I'm currently refactoring my code and I want to export an object array called REFERENCE_LIST to another file.
reference.js
export const REFERENCE_LIST = [
{name:"TypeA", foodList:foodAList},
{name:"TypeB", foodList:foodBList}
]
export const foodAList = ['apple', 'orange', 'banana']
];
export const foodBList = ['meat', 'fish']
];
However, the foodList field from REFERENCE_LIST is always "undefined". Am I referencing these arrays incorrectly?