Chekkan's Blog
Subscribe
Tagged

javascript

A collection of 2 posts

javascript

Defensive coding with guard assertions in Javascript

Let’s take a look at a function that took a score between 1 and 100 and returned a rating out of 5. function rating(score) { return Math.ceil(score / 20); }At first glance, this function looks simple, it has made a lot of assumption about its input argument. The

  • Harish Hareendra Babu
Harish Hareendra Babu Oct 6, 2019 • 2 min read
angularjs

Setting up mocha for testing AngularJS in Visual Studio using sinon, and chai

I decided to start a new asp.net mvc project with web api and use a bit of angularjs functionality. I had heard about mocha testing library which you can use do a tdd style development for my angularjs codes. I saw this pluraral sight course AngularJS for .NET Developers

  • Harish Hareendra Babu
Harish Hareendra Babu Mar 31, 2014 • 4 min read
Chekkan's Blog © 2022
Powered by Ghost