Hi,
Array.fill(), Array.map(), etc. don’t seem to work in the App Lab.
Here is some simple code that demonstrates the issue:
01 var list = [1, 2, 3, 4];
02 console.log(typeof(list));
03 console.log(Array.isArray(list));
04 list = list.fill(0);
The console shows:
“object”
true
Why does line 4 throw this error?
ERROR: Line: 4: TypeError: list.fill is not a function
Here are some links to reference pages:
JavaScript Array fill() Method
JavaScript Array map() Method
Any thoughts or hints? Am I getting the syntax wrong? Are these Array functions unavailable inside App Lab?
Thanks!