Sunday, December 26, 2010

Do you know?

1. hasOwnProperty() filter out properties that comes through prototype chain
2. HTMLColletion objects are live queries on DOM. and DOM operations are normally expensive
3. i+=1 is better than i++;
4. Javascript implicitly typecast variables while comparing, to avoid it use === or !== instead of == or !=
5. eval() is evil. Just avoid it
6. Passing strings to setInterval(),setTimeout() and Function() is more or less like eval()


No comments:

Post a Comment