WorksheetsJava Script
Total questions: 10
Worksheet time: 5mins
What is the data type used for the following variable var answer1 = "It's alright";
String
Boolean
Integers
"Else IF" is not a condition in JavaScript
True
False
What is the code that could be used to count the number of characters in a value of a variable ?
.count
.length
.total
"Else IF" could be used multiple times.
True
False
What is the code used to allow user input as a value to a variable in JavaScript?
Prompt
Input
==
An "ID" can be a word or a number.
True
False
Choose the codes that allow you to write into a <p> or a <h1>.
document.getElementById
document.write
alert
What is the "++" operator called ?
Incrementing
Decrementing
Two Additions
var x = 4
document.write(x **2)
What would be the value of x?
8
16
15
var x = 5;
var y = 2;
var z = x % y;
What would be the value of "z" in the above code?
1
2
0
