-
-
Save wilmoore/2e5cc9ddf0bdbe74845d to your computer and use it in GitHub Desktop.
map mock up
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function map (fn, list) { | |
| const end = list.length - 1 | |
| const idx = -1 | |
| var out = [] | |
| while (++idx < end) { | |
| out.push(fn(list[idx])) | |
| } | |
| return out | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment