Getting started with TypeScript

TypeScript is superset of JavaScript created by Microsoft. TypeScript – according to its website – “lets you write JavaScript the way you really want to. TypeScript is a typed superset of JavaScript that compiles to plain JavaScript”. Some features of TypeScript include: Support standard JavaScript Static typing Encapsulation using the classes and the modules Constructors,ContinueContinue reading “Getting started with TypeScript”

Simplifying the JavaScript Callback function for .NET developers

In JavaScript, functions are objects, and they can: Be passed as an argument to another function Return as a value from a function Be assigned to a variable Let’s assume that you have a JavaScript function (let’s call it function A) with the following properties: Function A takes another function (let’s call this one functionContinueContinue reading “Simplifying the JavaScript Callback function for .NET developers”

Objects in JavaScript for .NET developers – Part 1

Read full article on the Infragistics blog Here are some fun facts for you: JavaScript is not an object oriented language, but almost everything in JavaScript is an object. JavaScript does not have classes, and we can create an object from an object. A function can be used as a constructor, and returns a newlyContinueContinue reading “Objects in JavaScript for .NET developers – Part 1”

11 things about JavaScript functions that .NET developers should know: Part 2

Read full article on the Infragistics blog This is the second part of the series in 11 Things about JavaScript Functions that .NET Developers Should Know . In part 1 we discussed the following topics, JavaScript functions as an expression JavaScript functions as a statement Return statements in JavaScript functions Parameters in JavaScript functions TheContinueContinue reading “11 things about JavaScript functions that .NET developers should know: Part 2”

11 things about JavaScript functions .NET developers must know: Part 1

I have often seen .NET developers struggle with the JavaScript. They try to compare C# functions with the JavaScript functions and usually do some minor but conceptual mistakes while using it. As we all will agree that JavaScript functions are the backbone of the JavaScript programming language, and if one has good understanding of theContinueContinue reading “11 things about JavaScript functions .NET developers must know: Part 1”

Getting started with Unit Testing JavaScript using QUnit

It is good to have automated unit tests for the codes while developing. In unit test we test smallest unit of the code for a particular behaviour. The Unit test helps us to find bugs in the code early in the development cycle. Essentially unit test is the piece of code which verifies behaviour ofContinueContinue reading “Getting started with Unit Testing JavaScript using QUnit”

Prototypical inheritance in JavaScript

Read full post on falafel blog Before we can understand prototypical inheritance, let us start with a problem statement. You have a student for whom you need to: Calculate their grade Print the grade In JavaScript this can be simply implemented as follows: There are some inherent problems in the above approach: Variables are definedContinueContinue reading “Prototypical inheritance in JavaScript”

== and === operators of JavaScript in simple words

There are astronomical articles and blog posts have been written on == and === operators in JavaScript but I had tough time understanding it. So I decided to write my learning in this blog post. I will try to explain == and === in simplest words. To start with try to understand difference between theseContinueContinue reading “== and === operators of JavaScript in simple words”

JavaScript Functions is a Statement or Expression?

Answer of above question is JavaScript functions can be used either as statement or expression. JavaScript functions can be treated in different ways. They can be Expression Passed as value Returned as value Statement Functions in JavaScript can be Expression or Statement. Problem is in both flavour they look exactly same. So a function statementContinueContinue reading “JavaScript Functions is a Statement or Expression?”

How to setup JavaScript Build in Sublime Text 2

Yes I am turning friend of Sublime Text and thought to use Sublime for JavaScript development as well. To execute JavaScript in Sublime, you need to create new Build System for JavaScript. There are two steps you need to follow, Install Node.js Create new build system for JavaScript To install Node navigate to http://nodejs.org/ andContinueContinue reading “How to setup JavaScript Build in Sublime Text 2”