r6 - 23 Jun 2006 - 11:08:40 - MatthewEernisseYou are here: OSAF >  Documentation Web  >  ScoobyJavaScriptLibraries > JavaScriptHash > JavaScriptHashMethodGetItem

getItem

Class

Method of Hash

Library

hash.js

Syntax

exampleHash.getItem(key);

Parameters

key A string indicating the key for the desired item in the associative array.

Description

Returns the value of the item for a specific key in the Hash.

Examples

In the example below the variable movie will end up containing the string "Logan's Run".

var badSciFi = new Hash();
var movie = '';

badSciFi.setItem("Connery", "Zardoz");
badSciFi.setItem("York", "Logan's Run");
badSciFi.setItem("Douglas", "Saturn 3");

movie = badSciFi.getItem('York');
Edit | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r6 < r5 < r4 < r3 < r2 | More topic actions
 
Open Source Applications Foundation
Except where otherwise noted, this site and its content are licensed by OSAF under an Creative Commons License, Attribution Only 3.0.
See list of page contributors for attributions.