We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d214bf1 commit a9bbfb5Copy full SHA for a9bbfb5
1 file changed
assignments/q2-map.js
@@ -1,3 +1,7 @@
1
function map (xs, fn) {
2
- // ...
3
-}
+ var trans = new Array();
+ for (var x in xs) {
4
+ trans.push(fn(xs[x]));
5
+ }
6
+ return trans;
7
+}
0 commit comments