hax.github.com icon indicating copy to clipboard operation
hax.github.com copied to clipboard

偏门js面试题一道

Open hax opened this issue 6 years ago • 1 comments

『偏门』的意思是,这个题目基本没有什么卵用,不建议使用。

例外情形:候选人自称『精通JavaScript』或自评JavaScript水平8分以上(刘鑫老师说,程显峰出过一个面试标准,8分意味着达到标准委员会水平)。


JS中一个array(数组)的length属性的最大值是: 【更具有迷惑性的表述是:JS中一个array(数组)可以包含的element(数组元素)最多可以有多少个:】

A. 2**31 B. 2**32 - 1 C. 2**32 D. 2**53 - 1


该题的变形形式(更难一点):

JS中『array index』的最大值是:

A. Number.MAX_VALUE B. Infinity C. 规范没有定义 D. 下表中的 _______

n 2n - 2 2n - 1 2n
31 2**31 - 2 2**31 - 1 2**31
32 2**32 - 2 2**32 - 1 2**32
53 2**53 - 2 2**53 - 1 2**53
64 2**64 - 2 2**64 - 1 2**64

hax avatar Oct 25 '19 03:10 hax

2**32 - 1 image

jincdream avatar Dec 12 '19 06:12 jincdream