JavaScript: Difference between revisions

Content deleted Content added
Func (talk | contribs)
reverting to 27 July, someone's test, and an odd "Now then..."
Line 46:
 
===Objects===
Now then... forFor 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). That is, an object is an [[associative array]] similar to hashes in the [[Perl programming language]], arrays in [[PHP]], or dictionaries in [[Python programming language|Python]], [[PostScript]] and [[Smalltalk programming language|Smalltalk]].
 
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 Science|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 [[Document Object Model|DOM]] ([[window (computing)|window]], [[form (document)|form]], [[link]]s etc.).
Line 384:
[[Scripting language]]s are especially susceptible to bugs, and since JavaScript has varying implementations it is common to spend a great deal of time debugging. <!--
I feel skeptical. If there has been *any* study on which languages have more or less bugs, please tell me about it.
--> Each script block is parsed separately. On pages where JavaScript in script blocks is mixed with HTML, syntax errors can be identified more readily by keeping discrete functions in separate script blocks, or (for preference), using many small linked .js files. This way, a syntax error will not cause parsing/compiling to fail for the whole page, and can enable a [[dignified die]].
--> Each script block is parsed separately. On pages where JavaScript in nhxaOHoiscgbhvhjcfs
 
== Offspring ==