Skip to content

Commit

Permalink
updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
kolodny committed Jun 22, 2015
1 parent a6c328c commit 64f5cc4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions map/README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
You might know about [map](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Array/map) method, let's implement your own `map` one and name it, say `_map`.
You might know about [map](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Array/map) method, let's implement your own `map` one.

`_map` should function like `map` does:
`map` should function like `map` does:

```js
require('./')() // <- this is the file you make;
var map = require('./') // <- this is the file you make;

var numbers = [1, 2, 3];

var doubles = numbers._map(function(number) {
var doubles = map(numbers, function(number) {
return number * 2;
});

console.log(doubles); // [1, 4, 6]
console.log(doubles); // [2, 4, 6]

```

Expand Down

0 comments on commit 64f5cc4

Please sign in to comment.