0

時々、このエラーのようなエラーが発生します。なぜ発生するのですか?

4

1 に答える 1

0

これは、未定義の値のプロパティにアクセスしようとした場合に発生します。例えば:

var test; // test is now undefined, typeof(test) would return "undefined"
test.myPropertyName // => throws 'Uncaught TypeError: Cannot read property 'undefined' of undefined'

したがって、初期化されていない変数を使用して操作を実行しようとしているようです。

于 2016-02-17T11:23:27.500 に答える