Quiz: Enumeration Attributes

Take a short quiz on enumeration attributes in JavaScript.

1

Consider the following class definition:

class Book {
  constructor ({isbn, title, languages}) {
    this.isbn = isbn;
    this.title = title;
    this.languages= languages;
  }
  ...
}

(Select all that apply) Which of the following expressions represent a correct invocation of the Book constructor?

A)
let b = new Book("006251587X", "Weaving the Web", [1,3]);
B)
let b = new Book({"006251587X", "Weaving the Web", 
                  [LanguageEL.DE,LanguageEL.FR]});
C)
let b = new Book({isbn:"006251587X", title:"Weaving the Web", 
                  languages:[1,3]});
D)
let b = new Book({
    isbn: "006251587X",
    title: "Weaving the Web",
    languages: [LanguageEL.DE, LanguageEL.FR]
});
Question 1 of 30 attempted

Get hands-on with 1400+ tech skills courses.