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 -

Fatal error: Call to undefined function menu_execute_active_handler() in drupal 7.9 -

python - RuntimeWarning: PyOS_InputHook is not available for interactive use of PyGTK -