Note that there are some explanatory texts on larger screens.

plurals
  1. POWriting ECMAScript5 compliant code (Part 2)
    primarykey
    data
    text
    <p>I am currently learning advanced JavaScript, with an aim to build a standards compliant (HTML5, CSS3, ESv5) library. Along my way I have already asked a couple of related questions to try and figure out where to start, what to do, what not to do, what to avoid etc. I have already begun reading the ECMA-262 (ECMAScript version 5) documentation, and have been running a few tests before I get started on development work.</p> <p>Previous questions:</p> <p><a href="https://stackoverflow.com/questions/12053831/writing-ecmascript5-compliant-code">Writing ECMAScript5 compliant code</a></p> <p><a href="https://stackoverflow.com/questions/12051002/whats-the-difference-between-javascript-jscript-ecmascript">What&#39;s the difference between JavaScript, JScript &amp; ECMAScript?</a></p> <p>In my research I found out that different browsers implement the standard differently, and in that respect, they implement different objects. For example, IE implements an object called ActiveXObject, but this is not the case in FireFox. So I wrote a little test facility which determines if something is defined within the browser.</p> <p>Consider the following which tests a few known objects (including jQuery since this is not built in).</p> <p><img src="https://i.stack.imgur.com/2AxLC.png" alt="Browser Feature Test Facility"></p> <p>Again, I have reached a point where I am in need of help:</p> <p>Questions:</p> <ol> <li><p>Given the example above, what is the difference between an object and a function?</p></li> <li><p>Do I write functions or objects in ES/JS?</p></li> <li><p>Why is Object a function and not an object?</p></li> <li><p>Is there any hierarchical structure to built in objects / functions?</p></li> <li><p>Can built in objects / functions be redefined as something entirely different?</p></li> <li><p>Can built in objects / functions be undefined?</p></li> <li><p>Can built in objects / functions be assigned new features if they do not already support them natively?</p></li> <li><p>If an object is defined in one browser and not another, how can I compensate for this?</p></li> </ol> <p>P.S. I do not want answers relating to specific implementations (JavaScript/JScript), rather answers relating to the standard (ECMAScript v5). Thanks in advance!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload