0
我使用的節點計劃&它創建了以下這樣一個對象:如何訪問Javascript中的嵌套類對象?
{
recurs: true,
year: null,
month: null,
date: null,
dayOfWeek: null,
hour: null,
minute: Range { start: 0, end: 59, step: 2 },
second: 0
}
我如何可以訪問minute.Range.step
價值?
當我使用minute.Range.step
,節點引發以下錯誤:
TypeError: Cannot read property 'step' of undefined
我也試過minutes.Range["step"]
這是一樣的就是我上面試過。
'minute.step'或'minute [「step」]'。 – Amadan
'.minute.step'?你爲什麼使用Range? – Oriol
哎呀,我在寫我的問題時意外地輸入了錯誤的值@Amadan - 我編輯了問題以顯示我實際嘗試的內容 – James111