diff --git a/index.html b/index.html index 7ebdc3f6e..9b163c16b 100644 --- a/index.html +++ b/index.html @@ -1313,8 +1313,7 @@ _.escape('Curly, Larry & Moe');
result_.result(object, property)
- If the value of the named property is a function then invoke it.
- Otherwise, return its value.
+ If the value of the named property is a function then invoke it; otherwise, return it.
var object = {cheese: 'crumpets', stuff: function(){ return 'nonsense'; }};
diff --git a/underscore.js b/underscore.js
index 429a9b142..21a45c0d9 100644
--- a/underscore.js
+++ b/underscore.js
@@ -873,8 +873,8 @@
return (''+string).replace(/&/g, '&').replace(//g, '>').replace(/"/g, '"').replace(/'/g, ''').replace(/\//g,'/');
};
- // If the value of the named property is a function then invoke it.
- // Otherwise, return its value.
+ // If the value of the named property is a function then invoke it;
+ // otherwise, return it.
_.result = function(object, property) {
if (object == null) return null;
var value = object[property];