Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Good javascript reference [closed]

Tags:

javascript

What is a good javascript (book or site) that is not just focused on syntax but does a good job explaining how javascript works behind the scenes? Thanks!

like image 945
Sliceoftime Avatar asked Jan 19 '09 17:01

Sliceoftime


People also ask

Are JavaScript closures important?

Closures are important because they control what is and isn't in scope in a particular function, along with which variables are shared between sibling functions in the same containing scope.

What is closure in JavaScript example?

A closure is the combination of a function bundled together (enclosed) with references to its surrounding state (the lexical environment). In other words, a closure gives you access to an outer function's scope from an inner function.

Is there an official JavaScript documentation?

JavaScript is officially maintained by Mozilla so only documentation by Mozilla is official. The only engines that support JavaScript are currently made by Mozilla and every other engine implements ECMAScript.

How closures are used in JavaScript?

This is called a JavaScript closure. It makes it possible for a function to have "private" variables. The counter is protected by the scope of the anonymous function, and can only be changed using the add function. A closure is a function having access to the parent scope, even after the parent function has closed.


3 Answers

The JavaScript resources at the Mozilla Developer Center are pretty nice. They have a guide to JavaScript as well as a a reference.

The guide isn't really that great, but the reference is awesome. If I'm looking for something, I just use google with 'mdc' (or 'mdc javascript' in ambiguous cases) + keyword as search terms.


It might also be a good idea to read the 3 1/2 page long sections 4.2 and 4.3 of ECMA-262. Also, consider reading chapter 10.

like image 50
Christoph Avatar answered Oct 14 '22 08:10

Christoph


The rhino book is an excellent book to have on your desk.

like image 39
krosenvold Avatar answered Oct 14 '22 10:10

krosenvold


If you don't want a book that starts with explaining JavaScript syntax, then:

  • Watch the video lectures of Douglas Crockford in YUI Theater:

    • The JavaScript Programming Language,
    • Advanced JavaScript,
    • An Inconvenient API: The Theory of the DOM.
  • Read Pro JavaScript Techniques by John Resig (the author of jQuery library).

    • This book already assumes, that you are pretty familiar with JavaScript syntax and goes in-depth to the really hard and important issues you face in your life with JavaScript. It teaches you what goes on under the hood of a JavaScript library like jQuery and how you would go to implement your own.
like image 45
Rene Saarsoo Avatar answered Oct 14 '22 09:10

Rene Saarsoo