What is going to display with this js code:
var myArray = ['a', 'b', 'c']; console.log(myArray[-1]);
What is going to display with this js code:
var myArray = ['a', 'b', 'c']; console.log(myArray[-1]);
var myArray = ['a', 'b', 'c']; console.log(myArray[-1]);
By default array position start with 0 and the 1 and 2. So the output is undefined
.