我有以下代码:
module.export = {
OBJECT: {
"key01": "value01",
"key02": "value02" },
ARRAY: {
NESTED_ARRAY: [
`my.object.${this.OBJECT.key01}`,
`my.object.${this.OBJECT.key02}`,
]
}
}
console.log(ARRAY.NESTED_ARRAY[0] === my.object.value01)
如何使上面的console.log语句正确?
答案 0 :(得分:1)
将console.log(ARRAY.NESTED_ARRAY [0] === my.object.value01)更改为 console.log(ARRAY.NESTED_ARRAY [0]!== my.object.value01)