Answer:
20 will be displayed on the console.
Step-by-step explanation:
Given code is:
var numList = [10,20,30];
console.log(numList[numlist.length-2]);
The first line of code declares an array named numList and assigns it values given in the square brackets.
The second line of code is written to display the element on the index obtained by [numlist.length-2]
[numlist.length-2] means the second index.
Hence,
after running the code on JavaScript editor and dry running the code
20 will be displayed on the console.