Filters
Question type

Study Flashcards

Explain the difference between the Number and Math classes.

Correct Answer

verifed

verified

The Number class  contains methods for manipulating numbers and properties that contain  static values representing some of the numeric limitations in the JavaScript language (such  as the largest positive number that can be used in JavaScript. The Math class  contains methods and properties for performing mathematical calculations  in your programs.

The ____ class contains methods and properties for performing mathematical calculations in your programs.


A) Number
B) Integer
C) Function
D) Math

E) A) and D)
F) None of the above

Correct Answer

verifed

verified

____ refers to cleaning up, or reclaiming, memory that is reserved by a program.


A) Information hiding
B) Garbage collection
C) Data collection
D) Object hiding

E) B) and D)
F) B) and C)

Correct Answer

verifed

verified

What is garbage collection and how is it performed in JavaScript apps?

Correct Answer

verifed

verified

Garbage collection refers to cleaning up...

View Answer

The ____ property is a built-in property that specifies the constructor from which an object was instantiated.


A) experiment
B) try
C) prototype
D) test

E) A) and B)
F) A) and C)

Correct Answer

verifed

verified

Describe two ways of adding properties to an object.

Correct Answer

verifed

verified

1. You can declare properties within an ...

View Answer

The value of an object property can be another object.

A) True
B) False

Correct Answer

verifed

verified

True

Which method of the Math object rounds a value to the next lowest integer?


A) ceil()
B) floor()
C) max()
D) min()

E) A) and B)
F) C) and D)

Correct Answer

verifed

verified

The code (methods and statements) and data (variables and constants) contained in an encapsulated object are accessed through a(n) ____.


A) black box
B) view
C) interface
D) template

E) None of the above
F) B) and C)

Correct Answer

verifed

verified

A particular instance of an object ____________________ its methods and properties from a class-that is, it takes on the characteristics of the class on which it is based.

Correct Answer

verifed

verified

Match each statement below with a corrct item:

Premises
Programming code and data that can be treated as an individual unit or component
Returns the square root of the specified value
A function assigned a name within a custom object
Type of array that enables you to add object properties incorporating numbers
The easiest way to declare a custom object
Returns a value rounded to the nearest integer
Elements required for a source program to communicate with an object
Converts a number to a string using the number of decimal places specified
A template, or blueprint, that serves as the basis for new objects
Creates a Date object containing the current date
Responses
associative
literal
toFixed()
interface
new Date()
round( )
sqrt()
method
object
class

Correct Answer

Programming code and data that can be treated as an individual unit or component
Returns the square root of the specified value
A function assigned a name within a custom object
Type of array that enables you to add object properties incorporating numbers
The easiest way to declare a custom object
Returns a value rounded to the nearest integer
Elements required for a source program to communicate with an object
Converts a number to a string using the number of decimal places specified
A template, or blueprint, that serves as the basis for new objects
Creates a Date object containing the current date

Which class requires you to use a constructor?


A) Math
B) Number
C) Date
D) Array

E) None of the above
F) A) and B)

Correct Answer

verifed

verified

C

How do you declare a property within an object literal?

Correct Answer

verifed

verified

To declare a  property within an object ...

View Answer

To delete a specific property in a custom object, you use the ____ operator.


A) remove
B) cancel
C) erase
D) delete

E) B) and C)
F) B) and D)

Correct Answer

verifed

verified

You can create a function that will be used as an object method by referring to any object properties it contains with the ____ reference.


A) self
B) this
C) super
D) object

E) All of the above
F) B) and C)

Correct Answer

verifed

verified

You can append the name of any Number class method or property to the name of an existing variable that contains a(n)____________________ value.

Correct Answer

verifed

verified

To execute the same statement or command block for all the properties within a custom object, you can use the ____ statement.


A) for/each
B) while/in
C) for/in
D) loop/in

E) B) and C)
F) None of the above

Correct Answer

verifed

verified

The term ____ refers to information contained within variables or other types of storage structures.


A) data
B) object
C) class
D) instance

E) A) and B)
F) A) and C)

Correct Answer

verifed

verified

How can you get the full text of the day of the week based on information retrieved from a Date object?

Correct Answer

verifed

verified

If you need to return the full text of t...

View Answer

Describe two ways of adding a method to an object.

Correct Answer

verifed

verified

There are two ways to add a method to an...

View Answer

Showing 1 - 20 of 41

Related Exams

Show Answer