Please enable JavaScript.
Coggle requires JavaScript to display documents.
Beginning of ch 3 (relational opperators (= - greater than/equal to, <=…
Beginning of ch 3
relational opperators
= - greater than/equal to
-
-
-
-
conditional operator
is like the if-statement, but all in one line
condition ? value1 : value2 - - The value of that expression is either value1 if the test passes or value2 if it fails
-
-
note:
you can write arithmetic expressions on either side of the relational operator without using parentheses
-
-
if statement
set up as if ( ...) { }
if the condition in the ( ) is true, then it runs the statement in the { }
-
note
sometimes you cannot compare floating point numbers bc they have round off errors - instead you should compare that they are close enough
you can do this by: setting a final var called EPSILON = to 0, then testing if the difference b/w 2 nums is less than EPSILON
-