Tag: Javascript
-
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/ and…
-
Let us simplify “Hello World” Node.js Example and EventLoop
We are learning Node together. In last post We Setup Environment on Windows machine for Node.js Development. We also wrote a Hello World program to verify whether environment is setup as expected or not. In this post we will try to understand each line of Hello World program. Understanding of this is very useful for…
-
Setup Environment on Windows machine for Node.js Development
I am aspired to learn Node and I had tough time setting up environment for Node development. Guess what I got none other than Mr Glenn Block to help me. We did pair programming over Google Hangout and he helped me setting up. It was his kindness that he spent time with me. He has…
-
Revealing Module Pattern in JavaScript
We talked about Prototype Pattern in previous posts. You can read them at below link. Understanding Prototype Pattern in JavaScript Understanding Prototype Pattern in JavaScript: Part # 2 Revealing Module Pattern allows us to achieve Singleton object Private Public behaviour of functions and properties in the object. Let us consider the usual code we write.…
-
Understanding Prototype Pattern in JavaScript: Part # 2
Recently we had a look on Understanding Prototype Pattern in JavaScript. I tried to explain this pattern in most simplified way. In this post we will get more dipper and see how prototype works in JavaScript. Putting it in simple words in prototype pattern, we create object using template of an existing object. In prototype…
-
Understanding Prototype Pattern in JavaScript
I am writing this blog post from Bulgaria Sofia. I am here to attend Devreach conference organised by Telerik . In conference I had an opportunity to meet my great inspiration Dan Wahlin . I attended his session on “Patterns in JavaScript” and I must say it was one of the best technical session I…
-
Variable Scope Chain in JavaScript
Before you start reading this post I recommend you to read Variable Scoping and Hoisting in JavaScript . In this post we will take a look on Scope Chain in JavaScript. Let us consider you have declare a variable globally as below, In above code variables are declared globally, in other words they are not…
-
Get it right: null and undefined in JavaScript
Well, whenever I talk to developers, I find them in confusion about null and undefined in JavaScript. In this post I try to simplify understanding of null and undefined in JavaScript. To start with null is language keyword and undefined in value of a variable. Both evaluates to value that indicates absence of a value.…
-
Variable Scoping and Hoisting in JavaScript
Variable Scoping in JavaScript is quite different than other programming languages like C. In this post we will learn variable scoping in JavaScript. Simply putting, Scope of a JavaScript variable is within region of the program it is defined. So a variable defined inside function will have scope inside that function. Consider following code snippet,…
-
Invocation patterns in JavaScript
In JavaScript you can invoke a function in four different ways. In this post we will take a look on various invocation patterns. There are four ways a function can be invoked in JavaScript. Four invocation patterns in JavaScript are as follows, Function Invocation Pattern Method Invocation Pattern Constructor Invocation Pattern Indirect Invocation Pattern Function…