Webgyani logo

A cognitive perspective on web

“new” operator in JavaScript

In JavaScript, there’s an operator called new which we use to create an instance of an object (i.e Constructor function). So, what does new do? Well, it ensures that you always get an object when you use it with a constructor function. By the way, there’s no difference between a constructor function and a normal function, both are same. The term constructor function is used to indicate that we can create an object of that type using the new operator.

Posted in Uncategorized | 2 Comments

JavaScript Execution Context

I was long wanting to write about JavaScript execution context and how does it work, so here’s my take on what it is, if you find something incorrect or missing please feel free to correct me. ECMAScript has an abstract concept called “execution context”, which means when control is transferred to the ECMAScript executable code, the control is then entered in a execution context. So, what does the above statement mean? Well, it means every time a piece of code is executed in ECMAScript it has an execution context and the currently executing code is associated with that context. This can be conceived as some sort of container which encapsulates the context of the executing code, the could will look for its execution context for identifier and scope resolution. The execution context is not accessible to code; it is purely an implementation mechanism. Active execution contexts form a “stack”, the [Continue... ]

Posted in JavaScript | Leave a comment

CSS border radius madness

Border radius is an excellent addition in CSS3, it helps creating some awesome rounded corner boxes super easy. Modern browsers like Firefox, Safari, Chrome, Opera and IE9 all announced or have already implemented support for “border-radius” property in their CSS engine. Firefox and Webkit have the support in the form of vendor prefixed extension, latest Opera follows the W3C standard, it didn’t introduce any vender prefix even though the CSS3 specification is still being actively worked on, by the way the border-radius is now a CR (Candidate Recommendation) as of today. Well, as you might think that I’ll be talking about how to implement border-radius across different browsers, which in fact I don’t intend to do, as there are already a plenty of good examples that you can find if you do some Googling. Recently, I was playing around border-radius in different browsers and I came across some inconsistencies, which [Continue... ]

Posted in CSS | 1 Comment

About Me

Author: Arnab Chakraborty

I am a BrowserMonkey, a self-invented term means a person who uses Alt+Tab to jump from one browser window to another to check whether his code works properly or not :-).

Anyway humour apart, My name is Arnab Chakraborty. I am a Software Consultant and most of my work involves JavaScript, Ruby on Rails, HTML and CSS. This blog is the place where I share my findings on software development and rant about technology.

Categories