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.
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... ]
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... ]
About Me
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.
TweetsFollow @arnabc
- RT @thomasfuchs: We web devs should be grateful that Microsoft stopped developing IE for so long; without that there might have been no ... #
- RT @kangax: Nice post on IEBlog highlighting DOM fixes in IE9 http://j.mp/bi8oKJ Some ES5 methods (e.g. sealing ones) are still iffy in ... #
- RT @JonGregan: RT @TelegraphNews Stephen Hawking: God was not needed to create the Universe http://bit.ly/9bgygr #
- @anildigital You should change your Twitter client, check out the last few messages that you sent #
- I really liked when Crockford said - "JavaScript is now being the Technology leaders, who'd have ever imagined that" http://bit.ly/cIbGDE :) #