diff --git a/underscore.js b/underscore.js index 19836ebc3..7234e2141 100644 --- a/underscore.js +++ b/underscore.js @@ -33,17 +33,17 @@ // All native implementations we hope to use are declared here. var - native_forEach = ArrayProto.forEach, - native_map = ArrayProto.map, - native_reduce = ArrayProto.reduce, - native_reduceRight = ArrayProto.reduceRight, - native_filter = ArrayProto.filter, - native_every = ArrayProto.every, - native_some = ArrayProto.some, - native_indexOf = ArrayProto.indexOf, - native_lastIndexOf = ArrayProto.lastIndexOf, - native_isArray = Array['isArray'], // use [] notation since not in closure's externs - native_keys = Object['keys']; + nativeForEach = ArrayProto.forEach, + nativeMap = ArrayProto.map, + nativeReduce = ArrayProto.reduce, + nativeReduceRight = ArrayProto.reduceRight, + nativeFilter = ArrayProto.filter, + nativeEvery = ArrayProto.every, + nativeSome = ArrayProto.some, + nativeIndexOf = ArrayProto.indexOf, + nativeLastIndexOf = ArrayProto.lastIndexOf, + nativeIsArray = Array.isArray, + nativeKeys = Object.keys; // Create a safe reference to the Underscore object for reference below. var _ = function(obj) { return _.buildWrapper(obj); }; @@ -66,7 +66,7 @@ _.forEach = function(obj, iterator, context) { var index = 0; try { - if (obj.forEach === native_forEach) { + if (obj.forEach === nativeForEach) { obj.forEach(iterator, context); } else if (_.isNumber(obj.length)) { for (var i=0, l=obj.length; i