[JS] Data Types I & II: Numbers & Strings


I'm doing this course because I want to improve my knowledge but I'm stuck at level 10. Below my code:

var s = "world is mine".length;

Oops, try again. Make sure you find the length of your string.


console.log(s <---------- );

All you have wrong is the location of .length. you want to put it where I have the arrow. the difference is that you are creating the variable in the first line so it is only looking for the value of "s". you want to call it and then check how long it is.


Thanks for your reply but I also tried this:

var s = "world is mine";

But same issue.. :frowning:


Try using "world is mine".length only (without defining it as a variable and calling console.log).


That's was it :slight_smile: Thanks, man.


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