13. Comparisons


#1

SyntaxError: missing ) after argument list


console.log ("hi".length === 2);
console.log("nice".length < 5);
console.log("guy".length !== 4);
console.log("hello".length >= 5);


#2

Please include a link to the exercise so we can test your code. Thanks.


#3

https://www.codecademy.com/courses/getting-started-v2/2/2?curriculum_id=506324b3a7dffd00020bf661#


#4

We should not change the code, only insert the appropriate comparison operator. Here is the set up:

// 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  122);
console.log("Goody Donaldson".length  8);
console.log(8*2  16);

Reset the code so you get this to work with.


#5

Oh i thought it wanted me to do a code myself, thanks for that


#6

We will get a chance to be creative later in the course but for the time being, stay as close to the instructions as possible for the best results. A lot of the lessons are quite strict that way. Use the provided code, strings and values given. Once you complete the course, come back to the beginning and review. That will be a time to experiment and try out your ideas.


#7

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