Matintainable javascript
Nicholas Zakas: "Maintainable JavaScript" on Yahoo! Video
Avoid null comparisons
* Use instanceof
for sepcific types of objectsif (value instanceof constructor){
* Use typeof
to test for string, number, Booleanif (typeof value == "string") {
沒有留言:
張貼留言