Syntax
Logic and Boolean Expressions
Data Types
Functions
Miscellaneous
100
This kind of value is exactly what it says it is.
What is a literal?
100
Given... done = true; The value of done.
What is true?
100
Number String Boolean Object Function
What are the six fundamental data types?
100
A function is a special kind of this.
What is an Object?
100
JavaScript is translated from source code to machine code on the fly, because it uses a(n) ______________.
What is an "interpreter"?
200
Given... scores = {8.5, 7.2, 9.9, 6.8}; The value of score.length + 28;
What is 32?
200
It is a best practice to use "===" instead of "==" in order to avoid this.
What is automatic type conversion?
200
All numbers make use of this data type.
What is Number?
200
This function rounds off an integer using the “.5” rounds up rule.
What is "Math.round();"?
200
JavaScript was originally designed to execute here.
What is "within a web browser"?
300
This is a set of one or more key/value pairs.
What is an Object?
300
The code that builds the string 0123456789 one digit at a time, and then displays the result in an alert window.
What is What is the following? result = ""; for (i = 0; i <= 9; i++) { result += String.fromCharCode(i + 48); } alert(result);
300
'5' and "7.2" are examples of this data type.
What is String?
300
This function generates a random number.
What is "Math.random();"?
300
This code stores the name "Bob" in the third position of the array named "x" (hint: pay attention to the wording).
What is "x[2] = "Bob";"?
400
This code accesses an image named “image1”.
What is "document.images[“image1”]" or "document.images.image1"?
400
The code that builds the array 0,1,2,3,4,5,6,7,8,9 one element at a time, and then displays the result in an alert window.
What is is the following? result = []; for (i = 0; i <= 9; i++) { result[i] = i; } alert(result);
400
This code creates an array named "x" that is able to hold 50 variables.
What is "var x = new Array(50);"?
400
This explains why between Math.round() and Math.floor() can yield different values.
What is the fact that Math.round rounds decimals .0 to .4 to the lower whole number and decimals .5 to .9 to the higher whole number, whereas Math.floor rounds any decimal to the lower whole number?
400
The difference between "undefined" and "null".
What is the fact that a variable with no assigned value is undefined, whereas a variable assigned a value of null is not undefined?
500
The values of x, y and z after the execution of the three lines of code below: var x = 5, y = 6, z; x = y++; z = ++y;
What is x equals 6 and y equals 7 (after the x = y++ statement), and z equals 8 and y equals 8 (after the z = ++y statement)?
500
The code that builds the array 0,1,2,3,4,5,6,7,8,9 one element at a time, then strips out the comma delimiters, and then displays the result in an alert window.
What is the following? result = []; for (i = 0; i <= 9; i++) { result[i] = i; } alert(result.join(""));
500
Unlike many languages, JavaScript allows for the following two statements to be executed in succession: height = 8; height = "eight"; This is possible because JavaScript is an example of a _________ typed language.
What is "loosely"?
500
This code sorts an array of strings named "myArray" in alphabetically ascending order.
What is "myArray.sort();"?
500
The output of the following code: series = ""; count = 5; while (count > 1) { series += count; count--; } alert(series);
What is an alert dialog showing the string value of "5432"?