JS ES5

strictモード use strict

  • あなたは、変数を宣言するVARを使用する必要があります。
  • カスタム関数この時点窓
'use strict'
funcion Person(name){
    this.name = name;
}
Person("Tom"); //error
new Person("Tom"); //right

おすすめ

転載: www.cnblogs.com/KevinTseng/p/11999972.html