Is there a hash in javascript?
This article mainly introduces the relevant knowledge of "is there hash in javascript?". The editor shows you the operation process through an actual case. The operation method is simple, fast and practical. I hope this article "is there hash in javascript?" can help you solve the problem.
There is hash in JavaScript. Hash refers to the "hash table", which is a data structure that directly accesses the memory storage location according to the keywords; JavaScript establishes a corresponding relationship between the location of the data elements and the keywords of the data elements through the hash table, and the function that establishes this corresponding relationship is called the hash function.
The operating environment of this tutorial: windows10 system, javascript1.8.5 version, Dell G3 computer.
Is there a hash in javascript?
In javascript, hash refers to the hash table, which is a data structure that directly accesses the memory storage location according to the keywords; through the hash table, a corresponding relationship is established between the storage location of the data elements and the keywords of the data elements, and the function that establishes this corresponding relationship is called the hash function.
Hash is an assignment method, with many meanings, and the knowledge and methods searched are also very complex, but the actual use does not need to be too complicated, only a little bit can be used, and the writing method is also very simple. There are many ways to write hash.
My hash = {} ← Object {} my hash = {"a": 1} ← > Object {a: 1} my hash.a ← 1 > my_hash ['a'] ← 1my_hash = {BVV 2} ← > Object {BRV 2} my hash = {ARAL, Bazz2} ← > Object {a: 1. BRV 2} > my_hash.a ← 1 > my_hash ['a'] ← 1
The construction method of hash table:
Assuming that the number of data elements to be stored is n, set a continuous storage unit of length m (m > n) with the keyword Ki (0) of each data element.