【发布时间】:2016-04-19 04:53:12
【问题描述】:
[1,2,4,8][0,1,2,3]
// equals to 8 (the last element of the indexing array (3) becomes the index)
为什么这不是SyntaxError 错误(不好的遗留或有目的的功能)? (可能重复,但我找不到答案here。)
更新:为什么是the contents of the square brackets are treated as an expression?
【问题讨论】:
标签: javascript arrays indexing