JavaScript syntax: Difference between revisions

Content deleted Content added
m I add external link for better understanding javascript map
Tags: Reverted Visual edit
m Reverted edits by Anshulvishwa20 (talk) (AV)
Line 1,543:
 
==Objects==
For convenience, types are normally subdivided into ''primitives'' and ''objects''. Objects are entities that have an identity (they are only equal to themselves) and that map [https://anshuldev.com/mastering-javascript-arrays-your-path-to-unparalleled-coding-proficiency/] property names to values ("slots" in [[prototype-based programming]] terminology). Objects may be thought of as [[associative arrays]] or hashes, and are often implemented using these data structures. However, objects have additional features, such as a prototype chain{{clarify|date=January 2012}}, which ordinary associative arrays do not have.
 
JavaScript has several kinds of built-in objects, namely <code>Array</code>, <code>Boolean</code>, <code>Date</code>, <code>Function</code>, <code>Math</code>, <code>Number</code>, <code>Object</code>, <code>RegExp</code> and <code>String</code>. Other objects are "host objects", defined not by the language, but by the runtime environment. For example, in a browser, typical host objects belong to the DOM (window, form, links, etc.).