Global variables in JavaScript

It’s normal to get caught in the web of global variables, while working with JavaScript. Global variables tend to make the code less readable and maintainable. Douglas Crockford suggests a pattern that can be used to maintain global variables in […]

GuessingGame with Backbone.js

GuessingGame with Backbone.js

I have a set of examples that I always love to implement whenever I learn a new framework/language/technology. One of them is a Guessing Game. The application will generate a random number between 1 and 100. The user will play […]

Modularize JavaScript with Backbone

The jQuery code that I have used in projects have always had modularity issues. The code looks clumsy and messy making it very difficult to maintain. My work with Ext JS4 and Sencha Touch made me looking for a MVC […]

Function Statements and Expressions in JavaScript

JavaScript is not really taken very seriously as a programming language, when it has to be. This statement comes to my mind whenever I read the book JavaScript, Good Parts. In JavaScript you can define a function as a statement […]

Classes in JavaScript

JavaScript is a functional Object-Oriented language. The language’s first class citizens are functions. Functions can be assigned as literals to variables as shown below. var workOut = function(calories){ document.write("Burning " + calories + " calories); } workOut(100); Functions can also […]