mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-29 06:27:49 +00:00
Underscore shouldn't be able to iterate over the letters of a string cross-browser -- indexing into a string isn't supported in IE
This commit is contained in:
@@ -15,10 +15,6 @@ $(document).ready(function() {
|
||||
_.each([1, 2, 3], function(num){ answers.push(num * this.multiplier);}, {multiplier : 5});
|
||||
equals(answers.join(', '), '5, 10, 15', 'context object property accessed');
|
||||
|
||||
answers = [];
|
||||
_.each("moe", function(letter){ answers.push(letter); });
|
||||
equals(answers.join(', '), 'm, o, e', 'iterates over the letters in strings');
|
||||
|
||||
answers = [];
|
||||
_.forEach([1, 2, 3], function(num){ answers.push(num); });
|
||||
equals(answers.join(', '), '1, 2, 3', 'aliased as "forEach"');
|
||||
|
||||
Reference in New Issue
Block a user