Excercise 6


#1

It's only excercise 6 and it's not doing what I need it to do. Somple question...

Q:

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".

My answer:

// This is a comment that the computer will ignore.
// It is for your eyes only!
"cake" .length;

I don't know why this does nto work really. It says i'm doing something wrong. The right screen shows me the number " 4" so the code is correct. Yet it gives the oops error.

What am I doing wrong?


#2

So I fixed this... apparently you can't type a space in that code. Why not? It gives the same solution. So problem solved... but can anyone explain me why the space needs to go?


#3

The built-in methods in JavaScript have no space when calling them, that's how it has been made to run.