I was going through one of the interview process this is question poped up
var arr = ["a", "b", "c", "d"][1, 2, 3]
when I did console.log
it is printing "d"
and I tried
var arr = ["a", "b", "c", "d", "e"][1, 2, 3]
even it is printing "d"
.
Please explain with some documents if you can ?