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…

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…

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…