Skip to main content
4 events
when toggle format what by license comment
Jun 2, 2023 at 18:30 comment added ShadowRanger "Always prefer .map to any for loop." is overstating it a bit. If the item in question isn't an Array, e.g. you want to iterate over characters in a string, the conversion to an Array ([...s]) usually eats the savings from map; for(c of s)f(c) is longer than the unusual case of [...s].map(f), but if you'd need a closure only for the map, for(c of s)expr_with_c is meaningfully shorter than [...s].map(c=>expr_with_c).
Dec 22, 2015 at 20:33 history edited ETHproductions CC BY-SA 3.0
golfed examples
Feb 20, 2015 at 2:52 history wiki removed Doorknob
Feb 12, 2015 at 4:35 history answered Claudia CC BY-SA 3.0