An example to test drive JavaScript code using Jasmine.js. It has solution in steps for better understanding