Font size
WorksheetsVariables and Data Types
Total questions: 16
Worksheet time: 8mins
What data type to store a mobile phone number?
float
integer
string
Which of the following is a valid variable name in JavaScript?
1number
html
number
*number
What is the result of "80" + 71.2?
151.2
151
"8071.2"
What data type to store the price of a CD?
boolean
float
string
integer
What data type to store a postcode: IP4 5HD?
boolean
float
integer
string
5Price is a valid variable name in JavaScript.
true
false
A declared variable without assigning any value to it is called Null.
true
false
If you add a string and a number, the result will be a number.
true
false
Below is an example of how you will declare a variables in one single line .
Var month=”July”; date=3; year= 2019;
true
false
After execution of the following code, the value of G10 is Red?
var G10 = “green”;
var G7 = “yellow”;
var G8 = “blue”;
var G9 = “red”;
G7=G10;
G9 = G7;
G8=G9;
G10=G8;
true
false
The Ternary operator is represented by an exclamation (!).
true
false
Which of the following is Booleans?
true
"true"
"false"
What is the result of 2 * “4”?
8
24
6
What data type is used for: age = 15?
Boolean
String
Integer
Boolean
What data type would you use to store your Date of Birth?
Boolean
String
Date
Integer
What data type to store a credit card number?
Boolean
String
Integer
Float
