Is this response from the compiler valid?

前端 未结 3 1533
栀梦
栀梦 2020-11-29 09:43

The following code invokes an error. I could not find any information on this is in the reference. The lack of whitespace on the right hand side of the \'=\' operator is an

3条回答
  •  不知归路
    2020-11-29 09:57

    Place a space between = and [,

    let names = ["Anna", "Alex", "Brian", "Jack"]
    

    It seems that =[ is a reserved operator.

提交回复
热议问题