Join MDN and developers like you at Mozilla's View Source conference, 12-14 September in Berlin, Germany. Learn more at https://viewsourceconf.org

map

Couldn't the toUpperCase example be simplified as:

var strings = ["hello", "Array", "WORLD"];
var uppers = strings.map(String.toUpperCase);
I think the point was to demonstrate the use of a custom function with map. It ought to be a little less trivial though. --Nickolay 07:20, 4 June 2007 (PDT)
Is the change I just made a little less trivial enough? (Do please pardon my attempt at humor.) An example with thisObject specified would be good if we could come up with one that made sense, but I don't have time to invest in deep thought over it.  :-) --Waldo 23:34, 5 June 2007 (PDT)

Document Tags and Contributors

 Contributors to this page: Waldo, Nickolay, Parente
 Last updated by: Waldo,