是否可以引用对象内部的对象?

时间:2018-10-26 03:31:16

标签: javascript

我有一个对象,我想直接在当前作用域内引用该对象。但是我不能。欢迎任何建议。

const defaultState={
    targetFilters:[...],//a very complicated one
    tempFilters:this.targetFilters,// this is a copy of targetFilters, and it functions as a temp copy, so I want to refer to it directly. But if I use "this.", the tempFilters becomes undefined
};

0 个答案:

没有答案