From e02a1cf5c62142a94ae5db1f92ef36c2aaabdfa5 Mon Sep 17 00:00:00 2001 From: tjcrowder Date: Thu, 10 Sep 2009 14:57:10 +0100 Subject: [PATCH] doc: Merged old docs for Hash#get. --- src/lang/hash.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/lang/hash.js b/src/lang/hash.js index 4e51108..8f4731f 100644 --- a/src/lang/hash.js +++ b/src/lang/hash.js @@ -101,7 +101,13 @@ var Hash = Class.create(Enumerable, (function() { /** * Hash#get(key) -> value * - * Returns the value of the hash's `key` property. + * Returns the stored value for the given `key`. + * + * ### Examples + * + * var h = new Hash({a: 'apple', b: 'banana', c: 'coconut'}); + * h.get('a'); + * // -> 'apple' **/ function get(key) { // simulating poorly supported hasOwnProperty