wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

JavaScript Math

Total questions: 20

Worksheet time: 10mins

Name
Class
Date
1.

Which of the following operator is used for the Assignment Operator?

a)

==

b)

!

c)

=

d)

+

2.

What is the symbol pair used to write a new line within a string values?

a)

\*

b)

\'

c)

\n

d)

\br

3.

What is the symbol used for the INCREMENT operator in JS?

a)

+

b)

++

c)

=

d)

==

4.

Conditions return values of which data type?

a)

Integer

b)

boolean

c)

floating-point

d)

string

5.

file extension for external JS files

a)

.javascript

b)

.js

c)

.jscript

d)

.script

6.

built in object in JS that allows a script to perform mathematical task

a)

Arithmetic

b)

Math Object

c)

Operation Object

d)

Mathematics Object

7.

used to write comments

a)

++

b)

=

c)

//

d)

--

8.
A string;
a)
Expresses a true false statement
b)
can contain letters, numbers, spaces, and symbols.
c)
takes in an input, does something with it, and then returns an output.
d)
Runs a boolean (true/false) statement based on data entered
9.
What surrounds a string?
a)
Quotations
b)
Curly Brackets
c)
Parenthesis
d)
Square Brackets
10.
To display writing on the screen you must include this direction;
a)
Document Write
b)
documentWrite
c)
document.write( )
d)
document.write
11.
A variable;
a)
Expresses a true false statement
b)
stores a string, number, or boolean, and gives it a specific, case-sensitive name
c)
takes in an input, does something with it, and then returns an output.
d)
Runs a boolean (true/false) statement based on data entered
12.
A boolean;
a)
Expresses a true false statement
b)
can contain letters, numbers, spaces, and symbols.
c)
takes in an input, does something with it, and then returns an output.
d)
Runs a boolean (true/false) statement based on data entered
13.
A function;
a)
Expresses a true false statement
b)
can contain letters, numbers, spaces, and symbols.
c)
takes in an input, does something with it, and then returns an output.
d)
Runs a boolean (true/false) statement based on data entered
14.
An if/else statement;
a)
Expresses a true false statement
b)
can contain letters, numbers, spaces, and symbols.
c)
takes in an input, does something with it, and then returns an output.
d)
Runs a boolean (true/false) statement based on data entered
15.
What surrounds an if/else statement?
a)
Quotations
b)
Curly Brackets
c)
Parenthesis
d)
Square Brackets
16.

What is the value of Z at the end of the code?

var x = 5;

var y = x;

y++;

x--;

var z = x +y;

z++;

a)

10

b)

11

c)

9

d)

12

17.

What is the value of x at the end of the code?

var i;

var x=0;

for(i =0; i<10; i++){

x++;

}

a)

10

b)

11

c)

9

d)

12

18.

What is the value of c at the end of the code?

var a = 20;

var b = 14;

a++;

b--;

var c = a - b;

c++;

a)

10

b)

9

c)

11

d)

12

19.

What is the value of Z at the end of the code?

var x = 25;

var y = 11;

y++;

x++;

var z = x - y;

z--;

a)

11

b)

12

c)

13

d)

10

20.

What is the value of t at the end of the code?

var w = 13;

var s = 45;

w++;

s--;

var t = w + s;

t++;

a)

58

b)

51

c)

49

d)

59