logo CodeStepByStep logo

expressions3

Language/Type: JavaScript expressions
Author: Melissa Hovik (on 2016/09/25)

Trace the evaluation of the following JavaScript expressions, and give their resulting values. Value types may be numbers, strings, booleans, null, or NaN. Make sure to give a value of the appropriate type (such as including a .0 at the end of a real number).

"2" + 3 * 4 - 6
(2 + 32) - "17"
6 - "123" * 2
3.14 * 2
-5 + 19 % 4 - (32 * (5 / 2))
22 % 10 == 4 * 3
2 + "1 + 2"
177 % 100 % 10 / 2
390 / 10 % "10 / 2"
true && 1 < 2
false || 2 * 12 < 15 * 1.5
10 / 0.01
null + 10
0 / null

You must log in before you can solve this problem.

Log In

Need help?

Stuck on an exercise? Contact your TA or instructor.

If something seems wrong with our site, please

Is there a problem? Contact us.