Social Icons

Pages

Wednesday, November 30, 2016

Introduction to Objects I 1/33

We've come a long, long...
If yellow triangle warnings appear in the editor next to any code we provide in any exercise, it is fine to ignore them.
The very basic building block of JavaScript are primitive data types. We know of three primitives:
strings (e.g. "dogs go woof!")
numbers (e.g. 4, 10)
booleans (e.g. false, 5 > 4)
We learned about the use of comparators (eg.>, <=, !==, etc.). One really important thing to note is that any time comparisons are made, a Boolean value is returned.

Instructions
There is a long and ugly expression in the editor. Overall, it evaluates to a Boolean (i.e., either the entire statement is true, or it isfalse).
What does this expression in the editor evaluate to?
Declare a variable named answer. Assign to it the Boolean value that the expression evaluates to. Delete the default code in the editor and run your code.

var answer =(((3 * 90) === 270) || !(false && (!false)) || "bex".toUpperCase() === "BEX");













No comments:

Post a Comment