NEW
Font size
WorksheetsKhan Academy JavaScript
Total questions: 12
Worksheet time: 4mins
Which of these lines of JS code are syntactically correct?
rect(100, 100, 50, 50);
rect(100 100 50 50);
rect[100, 100, 50, 50];
rect(100, 100, 50, 50):
Which is the correct way to write a comment in JavaScript?
(#...#)
(!...!)
{{.....}}
//....
Which of these lines of JS code are syntactically correct?
rect100, 100, 50, 50
rect(100 100 50 50);
rect(100, 100, 50, 50);
rect(100, 100, 50, 50):
You want to draw a circle, which command is written correctly?
//circle
circle();
ellipse();
//ellipse
In the following line of code - rect(200, 150, 50, 120); What does the last number (120) stand for?
X
Y
W
H
In the following line of code - rect(200, 150, 50, 120); What does the first number (200) stand for?
X
Y
W
H
In the following line of code - rect(200, 150, 50, 120); What does the 3rd number(50) stand for?
X
Y
W
H
When adding a background color which is the correct line of code?
bg(200, 0, 0);
background(200, 0, 0);
bckgr(200, 0, 0);
backgnd(200, 0, 0);
RGB stands for what?
REAL GOOD BASICS
RED GREEN BLUE
REFERENCE GOOD BACKGROUNDS
RECTANGLE GOING BLUE
If I want to add a variable for my eyes, which would be the correct line of code.
var eyeSize;
variable = eyeSize!
variable (eyeSize)
var = eyeSize
The "X" parameter
Moves the object left and right
moves the object up and down
changes the width
changes the height
The "Y" parameter
moves the object left and right
moves the object up and down
makes the object wider or thinner
makes the object taller or shorter
