/// <summary> /// Calls a defined callback function on each element of an array, and returns an array that contains the results. /// </summary> /// <param name="callbackfn">A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.</param> /// <returns></returns> public JSDynamicArray Map(MapCallback callbackfn) { JSDynamicArray newArray = new JSDynamicArray(); for (int index = 0; index < this.Length; index++) { newArray.Push(callbackfn(this[index], index, this)); } return(newArray); }