Stuck on problem #1 for JavaScript


#1

<lesson #1 problem>

< the problem tells me to use substring but it keeps saying "Oops, try again. You didn't select the right substring from 'January'.".>


// Use console.log( ) to print out the substrings.
// Here is an example of the 1st to 4th letter of "JavaScript":
// console.log("JavaScript".substring(0,4));

//console.log("January".substring(0,3));

//console.log("Melbourne is great".substring(0,9));

//console.log("Hamburgers".substring(3,9));


#2

this 3 lines:

//console.log("January".substring(0,3));

//console.log("Melbourne is great".substring(0,9));

//console.log("Hamburgers".substring(3,9));

shouldn't be comments


#3

yes i thought it would work like that too but every time i answer it correctly it always comments that i am wrong for some reason. perhaps i should restart the whole lesson again.


#4

please post an updated version of your code on the forum, the url is the same for everyone


#5

Did u look at the hint


#7

Don't use // in code.Its for comments


#8

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.