Efficient JavaScript code

http://userjs.org/help/tutorials/efficient-code
Table of contents

  • Fast loops
  • Referencing elements
  • String matching
  • Create once, use repeatedly
  • eval is evil
  • Only listen to what you need
  • Avoid running unnecessary code
  • Timers take too much time
  • Take a short circuit
  • Reduce reflow
  • Assign multiple styles


具体可以直接看链接文章。

你可能感兴趣的:(JavaScript)