Skip to content

[js] 第720天 Array构造函数传入的参数有哪些情况? #3778

Open
@haizhilin2013

Description

@haizhilin2013

第720天 Array构造函数传入的参数有哪些情况?

3+1官网

我也要出题

Activity

alanhe421

alanhe421 commented on Apr 4, 2021

@alanhe421

可以是数组项,可以是数组长度,如果是单个数字且范围不在安全范围内,则抛出异常

CafuChino

CafuChino commented on Apr 5, 2021

@CafuChino

数组元素项或长度,如果是长度,该数组此时并没有包含任何实际的元素,不能理所当然地认为它包含 arrayLength 个值为 undefined 的元素,非合法值会抛出异常

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    jsJavaScript

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @haizhilin2013@alanhe421@CafuChino

        Issue actions

          [js] 第720天 Array构造函数传入的参数有哪些情况? · Issue #3778 · haizlin/fe-interview