background preloader

Courses

Facebook Twitter

Coderbyte | Practice programming with our programming & game challenges. Video Courses on JavaScript and Front-End Web Development. JSbooks - free javascript books. Computer programming. 11 Great JavaScript Interview Questions and Answers. The values will be logged in the following order: Let’s first explain the parts of this that are presumably more obvious: 1 and 4 are displayed first since they are logged by simple calls to console.log() without any delay 2 is displayed after 3 because 2 is being logged after a delay of 1000 msecs (i.e., 1 second) whereas 3 is being logged after a delay of 0 msecs.

OK, fine. But if 3 is being logged after a delay of 0 msecs, doesn’t that mean that it is being logged right away? And, if so, shouldn’t it be logged before 4, since 4 is being logged by a later line of code? The answer has to do with properly understanding JavaScript events and timing. The browser has an event loop which checks the event queue and processes pending events. Similarly, setTimeout() also puts execution of its referenced function into the event queue if the browser is busy. When a value of zero is passed as the second argument to setTimeout(), it attempts to execute the specified function “as soon as possible”. Video Tutorials on Web and Mobile Development. Become a Professional JavaScript Developer with Tuts+ Courses. A long time ago, in a galaxy far, far away, JavaScript was a hated language. In fact, “hated” is an understatement; JavaScript was a despised language.

As a result, developers generally treated it as such, only tipping their toes into the JavaScript waters when they needed to sprinkle a bit of flair into their applications. Despite the fact that there is a whole lot of good in the JavaScript language, due to widespread ignorance, few took the time to properly learn it. Ironically, it turns out that much of what the development community hated had very little to do with the JavaScript language itself. No, the real menace under the mask was the DOM, or “Document Object Model,” which, especially at the time, was horribly inconsistent from browser to browser. Luckily, the community has matured immensely since those days. In fact, there’s never been a more profitable time to become a JavaScript developer than now. The Basics The Wonder of jQuery jQuery on the Go Modern Frameworks Tools In Closing. Tuts+

Ray Villalobos | lynda.com search. Code School - Anatomy of Backbone.