JavaScript Tips
@JavaScriptWsdom
Insightful and practical JavaScript wisdom.
You might like
You might not need jQuery, as post-IE8 browsers are pretty easy to deal with. Read more at youmightnotneedjquery.com
A great article from Douglass Crockford about using private members in JavaScript javascript.crockford.com/private.html
Testing in Chrome 36, Array.prototype.filter is 95% slower than a for loop jsperf.com/aarontgrogg-ar…
Modern browsers adhering to ECMA Script 5.1 support the indexOf method on arrays. ecma-international.org/ecma-262/5.1/#…
JavaScript doesn't have block scope; program accordingly.
String concatenation performance can vary dramatically from browser to browser. For example, run jsperf.com/string-concate… in IE and Chrome.
We all love jQuery and Underscore, but when it comes to speed, prefer native for-loops over _.each or $.each jsperf.com/jquery-each-vs…
Prefer checking equality using === rather than ==. === compares value _and_ type, is more explicit and also slightly faster #JavaScript
Follow this account to suggest and receive JavaScript tips and advice! #JavaScript #jQuery
If using global variables, prefix them with "window" so that scope resolution is clearly understood by the dev. (I.e. window.[identifier])
United States Trends
- 1. DK Metcalf 7,170 posts
- 2. Nicki 135K posts
- 3. Gainwell 7,765 posts
- 4. Jags 6,301 posts
- 5. #Steelers 4,363 posts
- 6. #HereWeGo 3,421 posts
- 7. Lions 40.4K posts
- 8. Browns 34.8K posts
- 9. Trevor Lawrence 2,872 posts
- 10. Baker 22.4K posts
- 11. #KeepPounding 6,174 posts
- 12. Bucs 10.2K posts
- 13. #OnePride 2,719 posts
- 14. Panthers 30K posts
- 15. Giants 35.7K posts
- 16. Dan Campbell N/A
- 17. #PITvsDET 1,942 posts
- 18. Pickens 5,528 posts
- 19. Jaguars 10.1K posts
- 20. Anzalone N/A
You might like
Something went wrong.
Something went wrong.