I can’t find anything on this and I was wondering:
calling arrayfromargs(), what is actually returned? If I do
var myAwesomeArray = arrayfromargs(arguments); is "myAwesomeArray" a reference to "arrayfromargs" or is it the equivalent of doing something like:
myAwesomeArray = myOtherNoteQuiteAsAwesomeArray.slice();
Hope someone can clarify or point me to the documentation.
It creates a new Array object, copying the content of arguments. The arguments object is an Array object, though it supports array style indexing. This is a convenience function so that people who want to call Array object methods can do so, without having to do that copying to an actual Array object in JS.
If I understand correctly that means that:
arrayfromargs() creates a new array (by copying, not reference) of "arguments". this means when I assign it to something like newArray = arrayfromargs(arguments); newArray is now referencing the array created by arrayfromargs(). If I send another list to my function, a new array is created and, let’s say put in newArray, but since everything is done by copying already,  and  are pointing to two different arrays in memory.
Am I understanding this correctly?
Yes. Please let us know if you experience otherwise.
eek, so just realised that calling this as a matter of course imediately doubles gc work on every call…. glad i found this