WorksheetsQuestions on computer programming (for JavaScript)
Total questions: 7
Worksheet time: 7mins
What does the rect(); function do in JavaScript?
It draws an ellipse/circle.
It draws a rectangle.
It draws a triangle.
It makes a text box.
In a boolean expression, what's the operator that substitutes for the = sign?
!==
<=
===
>=
In JavaScript, what's the operator that substitutes for the "×" sign?
+
*
-
/
How do you declare a variable called "x" that has a value of 77?
this.x is 77
var x = 77
I can't remember!!!!!
Which of the following is are examples of single-line comments? Choose all that apply.
comment = Apples are red.
// Violets are blue.
# I love programming!
// Do you?
What does the "%" operator do?
It divides two numbers and takes the remainder. For example 6 % 5=1 because 6÷5=1, remainder 1.
It divides the number to the left of it by 100; like in regular math. So 6% = 1006 because of the statement.
True or false. 4 <= -3
(a)
