Discuss Scratch
- Discussion Forums
- » Advanced Topics
- » JavaScript Help
- StarscreamClone
- Scratcher
1000+ posts
JavaScript Help
Yes, more trouble in Codecademy tutorials…
Alright, here's everything, and thank you for helping.
Lesson: Comparisons, “Make the Computer Think” JavaScript track
Info:
Try to use each of the operators above. (<, >, <=, >=, ===, !=== )
01.
Choose the right comparison operator to make each of the four statements print out true.
02.
Write two more console.log statements that both evaluate to false.
My code:
console.log(15 > 4);
console.log(“Xiao Hui”.length < 122);
console.log(“Goody Donaldson”.length !=== 8);
console.log(8*2 === 16);
console.log(9 + 2 >=12)
console.log(9/3<2)
Alright, here's everything, and thank you for helping.
Lesson: Comparisons, “Make the Computer Think” JavaScript track
Info:
Try to use each of the operators above. (<, >, <=, >=, ===, !=== )
01.
Choose the right comparison operator to make each of the four statements print out true.
02.
Write two more console.log statements that both evaluate to false.
My code:
console.log(15 > 4);
console.log(“Xiao Hui”.length < 122);
console.log(“Goody Donaldson”.length !=== 8);
console.log(8*2 === 16);
console.log(9 + 2 >=12)
console.log(9/3<2)
Last edited by StarscreamClone (Aug. 7, 2013 17:53:40)
Somewhere in my 20s | He/It
Workin' on my degree in computer science and cognitive science, and the future president of 2036!
- StarscreamClone
- Scratcher
1000+ posts
JavaScript Help
EDIT: No I didn't figure it out. XD
Last edited by StarscreamClone (Aug. 7, 2013 17:54:14)
Somewhere in my 20s | He/It
Workin' on my degree in computer science and cognitive science, and the future president of 2036!
- scimonster
- Scratcher
1000+ posts
JavaScript Help
It should be !== instead of !===. I had to enter them all into my console to catch that.
Retired Community Moderator
BTW, i run Google Chrome 41.0.2272.101 on a Linux system - Ubuntu 14.04. NEW: iPad 4th gen. w/retina.
418 I'm a teapot (original - to be read by bored computer geeks)
THE GAME (you just lost)
; THE SEMICOLON LIVES ON IN OUR SIGS
- StarscreamClone
- Scratcher
1000+ posts
JavaScript Help
Ah, thank you so much! Wow, what a stupid mistake! It should be !== instead of !===. I had to enter them all into my console to catch that.
Somewhere in my 20s | He/It
Workin' on my degree in computer science and cognitive science, and the future president of 2036!
- Discussion Forums
- » Advanced Topics
- » JavaScript Help