Cleanup _.times documentation.

Former-commit-id: 59ce4b689bb280650d28944664abd6a38f1c43a0
This commit is contained in:
John-David Dalton
2012-08-31 13:05:12 -07:00
parent 8c2d39fb82
commit 71639cfea7

View File

@@ -4056,11 +4056,11 @@
* @param {Mixed} [thisArg] The `this` binding for the callback.
* @example
*
* _.times(3, function() { genie.grantWish(); });
* // => calls `genie.grantWish()` 3 times
* _.times(3, function(n) { genie.grantWish(n); });
* // => calls `genie.grantWish(n)` three times, passing `n` of `0`, `1`, and `2` respectively
*
* _.times(3, function() { this.grantWish(); }, genie);
* // => also calls `genie.grantWish()` 3 times
* _.times(3, function(n) { this.grantWish(n); }, genie);
* // => also calls `genie.grantWish(n)` three times
*/
function times(n, callback, thisArg) {
var index = -1;