#6 fails


#1

In lesson 6, when I entered:
"cake".length;
"cake".length * 9;

it fails, but if I change the order:

"cake".length * 9;
"cake".length;

it runs and returns 4. Why is that?


#2

Try putting "cake" between brackets, so that you get ("cake").length * 9
I think that'll help :smile:


#3

The task for the exercise is:

find the length of the word "cake"

The answer to that is 4. When you make your final code statement something other than that then the exercise will fail.


#4

Next time I get into the exercise I'll try that, thanks!


#5

Thanks. That part worked ok, it was when I added the second line that it failed but I could move the order of the two and it worked.


#6

The code checker is just looking at your final answer.