unit 8 javascript

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

In a custom JavaScript object, how does a method access the properties of an instance of the custom object when it is called?

By using the this keyword

In JavaScript, which term is used to describe a special function that enables you to create instances of custom objects?

Constructor

What does a constructor do?

Creates an empty template from which real-time objects, called instances, can be generated

What is the first step in creating a custom object in JavaScript?

Defining a constructor

Which of the following statements is true of constructors in JavaScript classes?

For each class, at most one constructor can be defined.

Which of the following functions are declared using the function* keyword and return iterable objects?

Generators

Which object can access items in a collection, one at a time?

iterator

Which statement will reorder and display the array myArray in alphabetical order?

myArray.sort();

Which property is used to add additional fields to a custom object?

prototype

When creating a custom object in JavaScript, what is instantiation?

The process of creating new copies of an object


Ensembles d'études connexes

Penny Ch. 14 - MSK, breast, and superficial structures

View Set

Chapter 9 Pain GOOD with Explanation

View Set