Fixed _.indexBy() thisArg example in documentation

This commit is contained in:
Espen Hovlandsdal
2014-02-22 11:43:21 +01:00
parent 154e57748f
commit f276f1e2f5

View File

@@ -1725,7 +1725,7 @@ _.indexBy(keys, 'dir');
_.indexBy(keys, function(key) { return String.fromCharCode(key.code); });
// => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }
_.indexBy(characters, function(key) { this.fromCharCode(key.code); }, String);
_.indexBy(keys, function(key) { return this.fromCharCode(key.code); }, String);
// => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }
```