Exam 14: Exploring Object-Based Programming

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

Which of the following methods is used to determine whether a property is enumerable?

(Multiple Choice)
4.8/5
(41)

You should start at the top and move down to the lower subclasses to define the _____.

(Multiple Choice)
4.9/5
(32)

A prototype chain is created by defining an object prototype as a constructor function.

(True/False)
4.9/5
(34)

Case-Based Critical Thinking Questions Case 13-3 Thomas wants to create a custom object using the new operator. He applies the following commands: var objName = new Object(); object.property = value; object.method = function() { commands }; What limitation can Thomas face while creating a custom object using the new operator?

(Multiple Choice)
4.9/5
(33)

The _____ method is similar to the apply() method except that the argument values are placed in a comma-separated list of values instead of an array.

(Multiple Choice)
4.9/5
(41)

The constructor for Object supports methods that are used to retrieve and define properties for any object.

(True/False)
4.7/5
(35)

You can determine whether an object has the property, prop , using the hasOwnProperty(prop) method.

(True/False)
4.8/5
(35)

for…in loops do not follow a specific order because they accept properties that can be listed and read out in any order. If order is important, you can use a(n) _____.

(Multiple Choice)
4.9/5
(28)

Which of the following object methods returns a text string representation of object using local standards?

(Multiple Choice)
4.8/5
(35)

The showName() method provides another way to create objects that are based on existing prototypes.

(True/False)
4.7/5
(29)

When an object is instantiated from a constructor function, it copies the properties and methods from the prototype into the new object.

(True/False)
4.9/5
(40)

Case-Based Critical Thinking Questions Case 13-1 Kenneth wants to create a custom object for a specific programming task. He has defined the custom object by creating it as an object literal. Kenneth should store the properties of the object within a comma-separated list of _____ pairs enclosed within a set of curly braces.

(Multiple Choice)
4.8/5
(46)

Refer to the following code snippet and identify the use of the shift() method in the code provided. pokerCard.prototype.replaceFromDeck = function(pokerDeck) { this.suit = pokerDeck.cards[0].suit; this.rank = pokerDeck.cards[0].rank; this.rankValue = pokerDeck.cards[0].rankValue; pokerDeck.cards.shift(); }

(Multiple Choice)
4.9/5
(39)

Which of the following commands is used to add a method to a prototype .

(Multiple Choice)
4.7/5
(36)

JavaScript is an object-based programming language that involves working with the properties and methods associated with objects.

(True/False)
4.8/5
(39)

A base object is the only object that has a prototype.

(True/False)
4.8/5
(43)

Which of the following methods is applied to sort any array in random order?

(Multiple Choice)
5.0/5
(37)

Identify the first step that is executed when JavaScript encounters code that references an object property or method.

(Multiple Choice)
4.9/5
(34)

for…in loops do not follow a specific order because properties can be listed and read out in any order.

(True/False)
4.7/5
(36)

Identify the syntax of the call() method.

(Multiple Choice)
4.9/5
(45)
Showing 21 - 40 of 77
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)