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

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -