Font size
S
M
L
XL
WorksheetsJava Script Pro
Total questions: 12
Worksheet time: 5mins
Name
Class
Date
1.
Which of the following is not JavaScript Data Types?
a)
Undefined
b)
Number
c)
Boolean
d)
Float
2.
Which command colors the background of your canvas?
a)
background
b)
endShape
c)
var = color
d)
fill
3.
What command removes the outlines from shapes?
a)
noOutline ();
b)
noColor();
c)
noBorder();
d)
noStroke ();
4.
The command: ellipse( 200,100, 20, 20) will draw:
a)
an ellipse that is 100 pixels wide and 100 pixels high
b)
a circle whose center is 200 pixels across and 100 pixels down
c)
a rectangle that is 200 pixels by 100 pixels wide
d)
a circle that is 200 pixels in diameter
5.
What are the 3 main languages of the Internet?
a)
HTML
b)
CSS
c)
Python
d)
Javascript
6.
What is Javascript used for?
a)
Behaviour
b)
Presentation
c)
Structure
7.
To increase value of X by 1?
a)
x++;
b)
x=x+1;
8.
Which of these is a loop?
a)
if(x<10)
b)
while(x<10)
c)
var x=10;
9.
var x = 5;
var y = 2;
var z = x % y;
What would be the value of "z" in the above code?
a)
1
b)
2
c)
0
10.
An "ID" can be a word or a number.
a)
True
b)
False
11.
Choose the codes that allow you to write into a <p> or a <h1>.
a)
document.getElementById
b)
document.write
c)
alert
12.
What is the code used to allow user input as a value to a variable in JavaScript?
a)
Prompt
b)
Input
c)
==
Reset
