NEW
Font size
WorksheetsControl Structures
Total questions: 21
Worksheet time: 15mins
His name is Fred and he is less than 16 years old
if (name = "fred" && age < 16 )
if (name === "fred" && age < 16 )
if (name = "fred" || age < 16 )
if (name === "fred" || age < 16 )
Repeat something 10 times
repeat 10
for (var i=0; i<10; i++)
repeat { } until 10;
while (i = 10)
When we are done with a line what do we put at the end?
a colon :
a semi-colon ;
a period .
a quotation mark "
When we surround a word with quotes "David" it's called ?
a program
a loop
a string
a command
What is a variable
Store values in containers so we can use them later.
Store values in containers so we can use them never.
Store values in containers so we can use them once.
Store values in containers so we can't use them later.
A short form writing the word variable is
rav
VAR
var
varia
What is the symbol used for the INCREMENT operator in JS?
+
++
=
==
Conditions return values of which data type?
Integer
boolean
floating-point
string
int count = 0;
while (count < 10) {
System.out.println("Welcome to Java");
count++;
}
Loops in programming start counting from ?
0
1
Any number
If there are errors in your code, what could you do?
STAY CALM ... Double check each line first ... ask person next to you ... then ask your teacher
PANIC ... get really worked up and upset
GET ALL STRESSED OUT and say I can't do this
Throw the computer out of the window
This loop can only be used when the programmer knows the number of times a code is to be repeated
while
for
do while
repeat until
What symbol represents the and operator in JavaScript?
AND
and
&
&&
What symbol represents the or operator in JavaScript?
OR
or
||
|
What is ++ ?
What is == ?
What is === ?
In a loop that runs from 0 to 9. What goes in the blank space?
var i;
for ( i= 0 ; i < ___ ; i++ ) {
console.log (i);
}
10
9
5
4
