NEW
Font size
Worksheetsjavascript
Total questions: 15
Worksheet time: 8mins
What type of variable is apple?
var apple = " Fuji "
string
Boolean
array
number
What type of variable is quantites?
var quantities = [2, 4, 10, 1]
string
Boolean
array
number
What is first index value of an array?
2
-1
0
1
What is the value of “a” in the following statement?
var a;
undefined
null
0
NaN
What is the value of:
”41” + 1
42
“42”
411
“411”
What is the value of:
”31” - 1
“30”
30
“311”
NaN
What is the extension for a JavaScript file?
.java
.jar
.js
.sj
JavaScript functions can access variables defined in the same scope?
True
False
Variables defined inside of functions are accessible outside of the function?
True
False
What is the name of the JavaScript standard?
JavaScript
ECMA Script
JS
PEP
In JavaScript strings must be defined using only double quotes (“).
True
False
Which list contains the correct data types in JavaScript?
numbers, strings, booleans, symbols, objects, null, and undefined
numbers, strings, booleans, symbols, objects, Nan, and undefined
numbers, strings, booleans, symbols, objects, null, and undefined
numbers, strings, booleans, symbols, objects, null
What will this code display?
8, 2, 1, 4, 7
82147
Myarray.length
5
What will this code display?
570
569
568
attendees
Which of these is a method?
getElementById( )
style
document
color
