How to add a refresh method to a backbone router

While creating a simple web app, where I created an ajax powered form using backbone.js, I needed the ability to clear the form if the user hit the reset button. So, I thought how about if I just refresh the current…

0

How to pass loop variables in a JavaScript callback

This is a common problem encountered i.e. if you are making ajax calls in a loop and you need access to the loop index in the AJAX callback, people often hit the JavaScript ‘reference’ behavior i.e. copying or assigning one…

0

Lesson 11: Scope in JavaScript

In this lesson, I focus on the nitty gritty of Scope and Lifetime of variables in JavaScript Language. JavaScript has similar scoping model as most other C like languages with a minor difference in that it does not have block…

0

Lesson 10: Prototypes in JavaScript

Sorry for the long delay between the last lesson and this one. Lots of travel and work got in the way of this post. Without further ado, here is the lesson on Prototypes. Prototype is much misused keyword in JavaScript….

0

Lesson 9: Constructor Functions

Constructor functions in JavaScript are special functions that allow you to create a factory function that can create many objects of the same type through code reuse. For Object Oriented programmers, constructor functions are a familiar concepts. The code for…

0

Lesson 8: JavaScript Functions

JavaScript functions are what gives Javascript its power. With JavaScript functions, you can break down your code into small modules which, helps with readability, debuggability and reusability of code. JavaScript functions double up as objects as well. Here is the…

0

Lesson 7: Assignment 1 – Etch-a-Sketch and CScript

Hello and Happy New Year! I am back in the new year with the first blog entry that will exercise your mind and give you some hands on experience as you progress through it. Reading input using node.js is not…

0

Lesson 6: Arrays in JavaScript

Arrays are one of the built in DataTypes in JavaScript. They are on par, if not more useful than Objects. Arrays in JavaScript perform the function of Arrays and Lists/Vectors in other languages. Arrays allow you to traverse their contents…

0

Lesson 5: Basics of Source Control with Git

In this lesson, I go over the basics of Source Control. Source Control is the way professional Software Developers maintain their code. Even though it is probably one of the most useful tools to learn when you start software development,…

0

Lesson 4: JavaScript Objects

Lesson 4 is about JavaScript Objects. JavaScript is an Object Oriented Language and objects in JavaScript are one of the foremost core concepts. Objects allow you to group data together and provide you with the flexibility and power of creating…

0