# Aw, come on! Stuck on some basic code :P

#1

I'm a 13 year old aspiring coder. I have a bug in my code, but sadly I can't figure out what's wrong. Here it is, if someone could help me that'd be great!
// Here is an example of using the greater than (>) operator.
console.log(15 > 4 true); // 15 > 4 evaluates to true, so true is printed.

// Fill in with >, <, === so that the following print out true:
console.log("Xiao Hui".length 8 true);
console.log("Goody Donaldson".length 15 true);
console.log(8*2 16 true);
Comparisons
So far we've learned about three data types:

strings (e.g. "dogs go woof!")
numbers (e.g. 4, 10)
booleans (e.g. false, 5 > 4)

List of comparison operators:

Greater than
< Less than
<= Less than or equal to
= Greater than or equal to
=== Equal to
!== Not equal to
Instructions
Try to use each of the operators above.

Choose the correct comparison operator to make each of the four statements print out true.

#2

console.log("Xiao Hui".length === 8);
console.log("Goody Donaldson".length ===15 true);
console.log(8*2 ===16 );

You don't have to write "true" inside the console.log(). You have to make a comparison.
For example. 1 < 8, or 7 < 4, or 10 === 10. The code will automatically check whether the comparison is is true or false. Having the previous example it will "think": is 1 less than 8? Yes, then I will return True. is 7 less than 4? No, then I will return False. Is 10 equal in both type and value to 10? Yes, then I will return 10.

``"Xiao Hui".length 8 true``

In that statement, Xiao Hui has a length of 8. The code checks if it is equal to 8. As it is, it returns 8.
< : less than

: greater than
== : equal to
=== : equal in both type and value.

Difference between == and === is that.
10 == 10 is true
10 === 10 is true
10 == "10" is true
10 === "10" is false

10 and 10 always mean 10, but when one of them is a string, and the other a number, then it returns false, as they are different in value.

#3