Before you bury yourself in packages, learn the Node.js runtime itself(Answers)

Answers for the questions mentioned in medium.com's featured post regarding nodejs

I have tried to answer the questions by Samer Buna regarding NodeJS runtime mentioned on the following link. Please correct me if something is wrong. Original post with following nodejs questions What is the relationship between Node.js and V8? Can Node work without V8? How come when you declare a... [Read More]

Debugging tips using chrome's developer's tool.

Power of 'console' object?

If you have worked with JavaScript, probably you must be familiar with console object used for debugging. Most of the us are familiar with console.log(), console,error(), console.info() and console.warn() but there are other interesting stuff we can do with console object which are listed below. 1) Embed styles You can... [Read More]

What is event delegation in JS?

Do you know about event bubbling and capturing?

Before understanding event delegation lets see what wikipedia says about Delegation “Delegation is the assignment of any responsibility or authority to another person”. In the world of JS, event delegation means assigning responsibility of one element to another element. Event delegation allows us to avoid adding event listeners on specific... [Read More]

How are variables memory referenced from execution context, incase of Closure?

Variables on one execution context are referenced by second execution context.

In this post I will explain, how variables are referenced from execution context in case of closure with an example. Let’s begin with an example below. function createFunctions() { var funcArray = []; for(var i=0; i< 4; i++) { funcArray.push(function() { console.log(i); }); } return funcArray; } var funcList =... [Read More]