Font size
WorksheetsJavaScript Variables and Arithmetic
Total questions: 14
Worksheet time: 8mins
Which of these is NOT a JavaScript operator?
+
*
++
*=
=+
What symbol is most likely to appear in a JavaScript program?
; (semicolon)
= (equals)
" (quote)
, (comma)
Which of these is a JavaScript keyword?
var
variable
equal
add
var a = 2;
Which of these will cause a to be 3 times larger?
a += 3;
a += 4;
a += 1
a++;
Which of these will cause a syntax error?
var strA = "She says, "Hi There" ";
var a = 4.98 - 15;
var b = b;
var strB = "\"quoted\""
What is the result of this code?
var a = 15 % 3;
a = 0
a = 5
a = 12
a = 45
Which of the following is NOT a valid starting character for JS variable names?
A (uppercase letter)
a (lowercase letter)
$ (dollar sign)
_ (underscore)
3 (digit)
Which of the following is a symbol that must NOT be present in any JS variable name?
A
z
_
%
Which of the following operator is used for the Assignment Operator?
==
!
=
+
What is the symbol used for the INCREMENT operator in JS?
+
++
=
==
used to write comments
++
=
//
--
Which of these will increase the value of the variable X?
increment (x)
x++;
x=x;
x+1;
To make things easier in JavaScript, you can exchange upper- and lower-case letters whenever you wish.
True
False
