November 13th in Basics by . 2 comments .

Show Love to the Strict Mode

If you’ve skimmed through the source code of o2.js modules you’ll see “‘use strict’” declarations at their top. The ‘use strict’ pragma forces JavaScript engine to run in strict mode, for the browsers that support it. Strict mode, as its name implies, obliges a stricter usage of the language. And …

Continue Reading
November 5th in Functional Programming by . no comment .

Everything You Need To Know About JavaScript Functions (and more)

Functions are the building blocks of any JavaScript module. In this tutorial, we’ll have a glance on basic principles behind functional programming in JavaScript, along with some lesser known features of JavaScript functions. This is mainly a follow-up, and a more in-depth analysis, of a former JavaScript Function Kung-Fu post. …

Continue Reading
April 26th in Basics, Tutorial by . no comment .

Functions and Closures in JavaScript

How to Declare a Function There are various ways to declare a JavaScript function: You can either declare with a function statement or with an anonymous function expression or by using a named function. //declare a function function sample(){} //a function expression var functionExpression = function(){}; //a named function var …

Continue Reading
o2.js _
Fork Ribbon