Archives for Wednesday, February 16, 2011

February 2011 (2)
SMTWTFS
« Jan Mar »
12345
6789101112
13141516171819
20212223242526
2728

Like this Archive Calendar widget? Download it here.


JavaScript: Using a constructor without new

In my previous blog post on the subject of constructor functions, I mentioned that there is a convention in JavaScript to name constructor functions with an initial capital letter and ordinary functions with an initial lowercase letter. This way, since the language doesn’t stop you from using a constructor as an ordinary function, there is at least some kind of “warning” that you may be using a constructor and therefore need to use new. […]

READ MORE