Archive for the ‘books’ Category

Literal Notations

Saturday, May 17th, 2008

A little something from my forthcoming book "Object-Oriented JavaScript" I thought would be nice to share.

Literal Notations
name literal constructor example
object {} new Object() {prop: 1}
array [] new Array() [1,2,3,'test']
regular expression
/pattern/modifiers new RegExp('pattern', 'modifiers') /java.*/img

Doug Crockford on inheritance

Tuesday, May 6th, 2008

JavaScript, the good parts

From YUI blog today, there is a free chapter of Douglas Crockford's JavaScript book.

It's a great read. I had the pleasure of reading drafts of the book and giving some inputs (Whoa, giving Doug Crockford input with his JavaScript book! Yeah, I know.) and I can only highly recommend the book. But don't take my word for it, go download the free chapter and decide for yourself.