Getting Started With Programming 13 comparisons


#1

// Here is an example of using the greater than (>) operator.
console.log(15 > 4); // 15 > 4 evaluates to true, so true is printed.

// Fill in with >, <, === so that the following print out true:
console.log("Xiao Hui".length === 7);
console.log("Goody Donaldson".length === 14);
console.log(8 * 2 === 16);
What is wrong with this.


#2

Your strings have spaces, meaning that the first has a length of 8 and the second 15.


#3

Xiao Hui is not equal to 7, since EVERY character is counted, including spaces, so Xiao Hui is greater than 7. Same with the next line, you HAVE to count spaces. Hope this helps!


#4

Please do not respond with the exact same thing I said, only rephrased.


#5

oops sorry i thought you were addressing a different situation with the way you worded the post! (Im new to english!)


#6

That is alright. I'm just sensitive. :wink: