json内部のthis
2556 ワード
JSONでのthis
json内部でこの内容を撮影すると、実行時にこの値が出力されます.
const json = {
t: this
}
console.log(json);
// {t: Window}
JSONで自身を呼び出します。
const json = new function() {
this.a = "HI";
this.b = " ";
this.c = "THERE!";
this.total = this.a + this.b + this.c;
};
console.log(json);
// {a: "HI", b: " ", c: "THERE!", total: "HI THERE!"}
Reference
この問題について(json内部のthis), 我々は、より多くの情報をここで見つけました https://velog.io/@nate_crema/JS-json-내부에서의-thisテキストは自由に共有またはコピーできます。ただし、このドキュメントのURLは参考URLとして残しておいてください。
Collection and Share based on the CC Protocol