Value assigned to primitive will be lost

前端 未结 4 1480
感动是毒
感动是毒 2020-12-17 08:09

If I have an array of objects, and loop through them assigning a value to an attribute for each one, WebStorm warns me:

Values assigned to primitive w

4条回答
  •  猫巷女王i
    2020-12-17 08:36

    If you will use square brackets the JetBrains editor(WebS/PhpS) will not show you any error.

    person['surname'] = 'Baz';
    

提交回复
热议问题