This article is a combined effort of Innofied Javascript developers Puja Deora and Subhajit Ghosh) We have been working on a project for past 8 months (ongoing). Over the course of this project, we have learnt that small tweaks to general coding prac…
As you know, JavaScript is the number one programming language in the world, the language of the web, of mobile hybrid apps (like PhoneGap or Appcelerator), of the server side (like NodeJS or Wakanda) and has many other implementations. It’s also the…
原文来自于:http://flippinawesome.org/2013/12/23/45-useful-javascript-tips-tricks-and-best-practices/ 1 – Don’t forget var keyword when assigning a variable’s value for the first time. Assignment to an undeclared variable automatically results in a global…
JavaScript Best Practices (w3cschool) Local Variables: · 总是在前面集中定义变量,(包括 for 的i).(strict mode) · 并且赋值, 避免 undefined的变量 · 视numbers, strings, or booleans 为基本元素, 不要当做objects. 因为obj会引来大开销 var x = "John"; (不要用: var y = new S…
<45 Useful JavaScript Tips, Tricks and Best Practices> http://flippinawesome.org/2013/12/23/45-useful-javascript-tips-tricks-and-best-practices/ 1 – Don’t forget var keyword when assigning a variable’s value for the first time. Assignment to an unde…
Some items you should konw : Graceful degradation : ensuring that your web pages still work without JavaScript Unobtrusive JavaScript : separating structure from behavior Backward compatibility : ensuring that older broswers dont choke on your scirpt…