abc b768 4slots First Name hook&ladder numberOfCustomers number-of-customers anExtremelyLongVariableNameIfYouAskMeAns: abc (legal) b768 (legal) 4slots (not legal) hook&ladder (not legal) numberOfCustomers (legal) number-of-customers (not legal) anExtremelyLongVariableNameIfYouAskMe (legal, but too long to be easy to read
3 = x;Ans: A constant cannot occur on the left side of an assignment statement. The left side of an assignment statement is the target variable that is being changed.
x = 3 + 5;The resulting value of x is 8.
a = dog + cat; b = 5 + apple; c = grape + 7;The resulting values of a, b, and c are dogcat, 5apple, and grape7, respectively.
<html> <body> <h1>Humphrey Bogart Quote</h1> <script type=text/javascript> var name = Sam; window.alert(Play it again, + name + .); </script> <body> </html>
window.alert(1 + 2); window.alert(1 + 2); window.alert(1 + 2); window.alert(1 + 2); window.alert(1 + 2 + 3 + 4 + 5);
roll = 1 + Math.floor(6 * Math.random( ));