I have the following script:
for (var i = 0; i < obj.length; i++) {
obj.push("It's nice to work at Bass Pro Shop!");
}
return obj;
}
function validate(reason) {
return reason.split(' ').length < 3
}
I'm receiving this error when trying to run my JS:
FATAL ERROR: invalid array length Allocation failed - JavaScript heap out of memory
I've checked other similar posts that say to increase the memory size f.x., node --max-old-space-size=16000 yourFile.js or from FATAL ERROR to my script they both don't work. Any help would be greatly appreciated.