Good day,
I have an empty array in one file, and an array with data in another. I want to push all the data from one to the other. My problem is the array is inside a CONSTANT. The normal way to .push or .add to the array is not working. Any help is appreciated.
File 1 – Array
var CONSTANTS = {
LOCATION_LOOKUP_DATA :[], // want to add array data inside this array
};
File 2 – Array
var AVAILABLE_ZIPS_Widget = [
["10501","10502","10504","10505"]
];
CONSTANTS.LOCATION_LOOKUP_DATA.push(AVAILABLE_ZIPS_Widget);
I think you meant to use: