This is asking me to find the length of cake, so i do, and it shows 4, however it says that i didn't do it right. can anyone help?
post your code so we can help
Are you finding the length of the string cake, or a variable called cake?
If it was the first one:
and the second:
var cake = "chocolate"; cake.length;
Same problem as nightrider556. Found the length, but page still shows "error" and won't let me continue. Here are the instructions:
The computer will ignore the code on lines 1-2, since it is commented out.
On line 3, find the length of the word "cake".
And here's my code:
- // This is a comment that the computer will ignore.
- // It is for your eyes only!
- "cake" .length
Returns result "4" which is correct, but page also returns:
Oops, try again. Did you find the length of "cake"?. Click "Stuck? Get a hint!" for an example.
Try it without that space separating the string from .length.