JAVASCRIPT TEST 3 QUESTIONS AND
ANSWERS
A(n) ____ function is a function that is used as the basis for a custom object. - Correct
Answers -constructor
A(n) ____ is an object that has been created from an existing class. - Correct Answers -
instance
____ refers to cleaning up, or reclaiming, memory that is reserved by a program. -
Correct Answers -Garbage collection
Which method of the Math object rounds a value to the next lowest integer? - Correct
Answers -floor()
he code (methods and statements) and data (variables and constants) contained in an
encapsulated object are accessed through a(n) ____. - Correct Answers -interface
To execute the same statement or command block for all the properties within a custom
object, you can use the ____ statement. - Correct Answers -for/in
A(n) ____ array is an array whose elements are referred to with an alphanumeric key
instead of an index number. - Correct Answers -associative
Which class requires you to use a constructor? - Correct Answers -Date
The ____ property is a built-in property that specifies the constructor from which an
object was instantiated. - Correct Answers -prototype
When creating an object using a literal, you separate multiple property-value pairs with
____. - Correct Answers -commas
Which Number class method can you use to convert a number to a string that is
formatted with local numeric formatting style? - Correct Answers -toLocaleString
Programming code and data that can be treated as an individual unit or component -
Correct Answers -object
, Type of array that enables you to add object properties incorporating numbers - Correct
Answers -associative
Elements required for a source program to communicate with an object - Correct
Answers -interface
A template, or blueprint, that serves as the basis for new objects - Correct Answers -
class
Returns the square root of the specified value - Correct Answers -sqrt()
Converts a number to a string using the number of decimal places specified - Correct
Answers -toFixed()
The easiest way to declare a custom object - Correct Answers -literal
Returns a value rounded to the nearest integer - Correct Answers -round()
Creates a Date object containing the current date - Correct Answers -new Date()
A function assigned a name within a custom object - Correct Answers -method
The term ____ refers to information contained within variables or other types of storage
structures. - Correct Answers -data
You can create a function that will be used as an object method by referring to any
object properties it contains with the ____ reference. - Correct Answers -this
To add a property to a constructor function, you must add a statement to the function
body that uses the ____ keyword. - Correct Answers -this
The ____ class contains methods and properties for manipulating the date and time. -
Correct Answers -Date
The ____ class contains methods and properties for performing mathematical
calculations in your programs. - Correct Answers -Math
The ____ class contains methods for manipulating numbers and properties that contain
static values representing some of the numeric limitations in the JavaScript language. -
Correct Answers -Number
When working with a date, JavaScript stores the month as a ____. - Correct Answers -
value from 0-11
To delete a specific property in a custom object, you use the ____ operator. - Correct
Answers -delete
ANSWERS
A(n) ____ function is a function that is used as the basis for a custom object. - Correct
Answers -constructor
A(n) ____ is an object that has been created from an existing class. - Correct Answers -
instance
____ refers to cleaning up, or reclaiming, memory that is reserved by a program. -
Correct Answers -Garbage collection
Which method of the Math object rounds a value to the next lowest integer? - Correct
Answers -floor()
he code (methods and statements) and data (variables and constants) contained in an
encapsulated object are accessed through a(n) ____. - Correct Answers -interface
To execute the same statement or command block for all the properties within a custom
object, you can use the ____ statement. - Correct Answers -for/in
A(n) ____ array is an array whose elements are referred to with an alphanumeric key
instead of an index number. - Correct Answers -associative
Which class requires you to use a constructor? - Correct Answers -Date
The ____ property is a built-in property that specifies the constructor from which an
object was instantiated. - Correct Answers -prototype
When creating an object using a literal, you separate multiple property-value pairs with
____. - Correct Answers -commas
Which Number class method can you use to convert a number to a string that is
formatted with local numeric formatting style? - Correct Answers -toLocaleString
Programming code and data that can be treated as an individual unit or component -
Correct Answers -object
, Type of array that enables you to add object properties incorporating numbers - Correct
Answers -associative
Elements required for a source program to communicate with an object - Correct
Answers -interface
A template, or blueprint, that serves as the basis for new objects - Correct Answers -
class
Returns the square root of the specified value - Correct Answers -sqrt()
Converts a number to a string using the number of decimal places specified - Correct
Answers -toFixed()
The easiest way to declare a custom object - Correct Answers -literal
Returns a value rounded to the nearest integer - Correct Answers -round()
Creates a Date object containing the current date - Correct Answers -new Date()
A function assigned a name within a custom object - Correct Answers -method
The term ____ refers to information contained within variables or other types of storage
structures. - Correct Answers -data
You can create a function that will be used as an object method by referring to any
object properties it contains with the ____ reference. - Correct Answers -this
To add a property to a constructor function, you must add a statement to the function
body that uses the ____ keyword. - Correct Answers -this
The ____ class contains methods and properties for manipulating the date and time. -
Correct Answers -Date
The ____ class contains methods and properties for performing mathematical
calculations in your programs. - Correct Answers -Math
The ____ class contains methods for manipulating numbers and properties that contain
static values representing some of the numeric limitations in the JavaScript language. -
Correct Answers -Number
When working with a date, JavaScript stores the month as a ____. - Correct Answers -
value from 0-11
To delete a specific property in a custom object, you use the ____ operator. - Correct
Answers -delete