Quiz on Iterators and Symbols

Check your knowledge of Iterators and Symbols.

1

How can we explore the Symbol properties of the numbers array in the following code?

const numbers = [1, 2, 3];
console.log("The Symbol properties in arrays are:");
console.log(//...code goes here... 
);
A)
console.log(Object.getOwnPropertySymbols(numbers));
B)
console.log(Object.getOwnPropertySymbols(Object.getPrototypeOf(numbers)));
C)
console.log(Object.getOwnPropertyNames(Object.getPrototypeOf(numbers)));
Question 1 of 50 attempted

Get hands-on with 1400+ tech skills courses.