10.
What should the console display when the following code is run?
const [, , person] = ['John', 'Simon', 'Emma'];
console.log(person);
Emma
[John, Simon]
Simon
John
Correct: A
The square brackets [, , person] represent array destructuring. The first two elements of the array, 'John' and 'Simon', are skipped using the empty commas [, ,]. The third element, 'Emma', is assigned to the variable person.