Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript hashtable

//  JavaScript's Object type is a special hash table
// The most common example of a Hash Table in JavaScript is the Object data type, 
// where you can pair the object's property value with a property key.

In the following example, the likes object contain what people like by having their
name "John" as Key and "Playing Football"  as the value.

let likes = {
  John: "Playing Football",
  Jane: "Watching Soap Operas"
}

More details
https://www.freecodecamp.org/news/javascript-hash-table-associative-array-hashing-in-js/
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #hashtable
ADD COMMENT
Topic
Name
5+1 =