In Javascript you can transform an iterator into another iterator (the map() function in most languages) like this:
map()