I am curious about the outcome of this code in JavaScript and would like to understand it better. When I use the following code, it produces these results:
var a =[1][1];
var b = [1][0];
if(a){console.log(true);}else{console.log(false);} --> returns false
if(b){console.log(true);}else{console.log(false);} --> returns true
Can someone explain in detail how JavaScript interprets these results?