Undestanding double bracket operation in Javascript -


what [1,2,3][1,2] means in javascript? not understand supposed do, , have no clue how google such thing.

any ideas?

i assume quite newbie question, please forgive ignorance.

so [1,2,3][1,2] whole accesses index 2 of array, , yields 3.


Comments

Popular posts from this blog

xml - Extract substrings with XSLT -

math - "ELO Rating" and how does "TSR Rating" work? -

How can do a tuple comparison in coffeescript similar to that in python? -