wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

JS Review

Total questions: 13

Worksheet time: 9mins

Name
Class
Date
1.

What does the JavaScript language do?

a)

It can make drawings and animations.

b)

It animates websites.

c)

It creates websites.

d)

It can make simple games.

e)

It can does Windows things.

2.

If I were to animate a ball moving from left to right, at a speed of 1 pixel, what would be a reasonable block of code?

a)

var xPos = 0;

draw = function() {

ellipse(xPos, 200, 50, 50);

xPos ++;

};

b)

var xPos = 0;

ellipse(xPos, 200, 50, 50);

xPos ++;

c)

ellipse(xPos, 200, 50, 50);

xPos ++;

d)

var xPos = 0;

draw = function() {

ellipse(xPos, 200, 50, 50);

xPos += 1;

};

3.

The type of JS language the following shows (HTML/JS or Processing.JS):

ellipse(200, 200, 50, 50);

(a)  

4.

If I wanted to stop a shape at the end of the 400 pixel wide canvas, which would be the correct code?

a)

if(x > 400) {

speed = 0;

}

b)

if(x < 400) {

speed = 0;

}

c)

while(x > 400) {

speed -= 0;

}

d)

ellipse(speed = 0;);

5.

What is a brief description of JS?

a)

JS is a programming language used to animate webpages, and make drawing and animations. This language has many types of different primitives.

b)

JS is where we create our basic webpage plan, and can also be used for simple decorating.

c)

JS is used for decorating basic webpages.

d)

JS can be a great language for Microsoft Workers.

6.

(a)   is a programming language that we are talking about.

7.

How many primitives does JavaScript have?

a)

6

b)

8

c)

10

d)

3

8.

Which do you prefer?

a)

Processing.JS

b)

HTML/JS

c)

Line-coder

9.

Which of these will make an outline or line thicker?

a)

strokeWeight(3);

b)

strokeWeight(6);

c)

stroke(255, 255, 255);

d)

stroke(0);

10.

When we use the document variable, we are using (a)   JS (HTML or Processing.JS)

11.

I would probably use a _____ primitive for JavaScript.

4 lines
12.

(a)   Statements use conditionals (which include booleans), and a command to do.

13.

Which are the division sign, multiplication sign, and comment sign in JavaScript? (In order)

a)

÷, ×, *

b)

/, *, //

c)

//, ×, /

d)

\, *, //