Talk i gave at WebTech Conference on November 10th 2010.
Abstract:
At last, ecmascript 5th edition is landing in all modern browsers. What are the new parts of the language and how can they help us to write better code?
Also
http://federico.galassi.net/
http://www.webtechcon.it
Follow me on Twitter!
https://twitter.com/federicogalassi
7. Years later...
“It turns out that standard bodies are
not good places to innovate. That’s
what laboratories and startups are
for. Standards must be drafted by
consensus.”
http://yuiblog.com/blog/2008/08/14/premature-standardization/
36. enumerable
Does for/in show it up ?
Object.defineProperty(bart, “phobia”, {
value: “coffins”,
enumerable: false
})
// Like for/in and collect keys
Object.keys(bart)
> [“name”, “surname”, “age”]
45. Function.bind()
var bart = {
name: “bart”
}
var hello = function(greet) {
return greet + “i am “ + this.name
}
// bind to this and partial application
(hello.bind(bart, “hey”))()
> “hey, i am bart”