r4 - 23 Jun 2006 - 11:09:58 - MatthewEernisseYou are here: OSAF >  Documentation Web  >  ScoobyJavaScriptLibraries > JavaScriptHash > JavaScriptHashMethodHasValue

hasValue

Class

Method of Hash

Library

hash.js

Syntax

exampleHash.hasValue(val);

Parameters

val The value to look for in the associative array.

Description

Returns Boolean true if the value exists in the Hash, false if it does not.

Examples

var badSciFi = new Hash();
var movieExists = false;

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

movieExists = badSciFi.hasValue('Zardoz'); // movieExists is true
movieExists = badSciFi.hasValue('Westworld'); // movieExists is false
GlossaryForm
DisplayName Change Me!
GlossaryTermCategories

Edit | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r4 < r3 < r2 < r1 | 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.