Open danpetitt opened 7 years ago
Hi @coderangerdan . Speaking in terms of JS, your code can be roughly translated to,
let arr = [];
let p = arr.push;
p.call(global, 'new string');
arr.length; // eval to 0 in JS
In this case you want arr
to be the thisArg
for call
, or bind p
to arr
in the first place.
Trying to add items to a Javascript Array fails to add the item for some reason:
I can add items to the array using an alternative indexed property approach but it would be nice the 'push' function worked:
Any ideas what I am doing wrong, or is this an issue; calling other functions works fine.