WorksheetsJRDL - JS Variables, Datatypes, and Operators
Total questions: 13
Worksheet time: 7mins
How do you declare a variable?
var = firstName = ' jane';
var firstName = 'jane';
var 'firstName' = jane;
var firstName == 'jane';
What data types have you learned so far?
text, integer, true, false
string, number, boolean
boolean, characters, undefined
text, number, true, false
What will the following code evaluate to?
"cat" === "Cat"
false
true
What does the strict equality operator look like?
==
====
===
=
What will the following code evaluate to?
'610' !== 610
false
true
What will the following code evaluate to?
'87' !== '87'
false
true
What is the final result of number?
var number = 99;
number--;
number--;
number++;
number--;
number--;
number++;
96
97
98
100
What will the following code console log?
var favFood = 'pizza';
console.log('favFood');
'pizza'
pizza
'favFood'
none of the above
What is the assignment operator?
===
=
==
+
When declaring a variable what comes after the reserved word var?
the variable name
the assignment operator
the value
none of the above
What is the final value of name?
var name = 'mel';
name = undefined;
name = 'jay';
name = 'grumpy cat';
'jay'
'mel'
undefined
'grumpy cat'
What will the following code evaluate to?
100 >= 99
false
true
What is the main purpose of JavaScript?
Functionality
Styling
Structure
Nothing
