JavaScript syntax: Difference between revisions

Content deleted Content added
RHaworth (talk | contribs)
{{move to Wikibooks}}
Line 396:
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 property names to values, ("slots" in [[prototype-based programming]] terminology). JavaScript objects are often mistakenly described as [[associative arrays]] or hashes, but they are neither.
 
JavaScript has several kinds of built in objects, namely [[Array]], [[Boolean datatype|Boolean]], [[Date]], [[Function (programming)|Function]], [[Mathematics|Math]], [[Number]], [[Object (computer science)|Object]], [[regular expressions|RegExp]] and [[String#Mathematics and(computer Computer Sciencescience)|String]]. 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 (computing)|window]], [[form (document)|form]], [[link]]s etc.).
 
===Creating objects===