The functions "each" and "map" have the element value for the "thisArg" parameter. That should be null and element value should be the first element in the list. Or better yet just call the function without using apply, as it isn't necessary in these scenarios.
The functions "each" and "map" have the element value for the "thisArg" parameter. That should be null and element value should be the first element in the list. Or better yet just call the function without using apply, as it isn't necessary in these scenarios.