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. Prince Andrew 23.8K posts
- 2. $AMZN 46.1K posts
- 3. Ryan Clark 2,602 posts
- 4. Sydney Sweeney 105K posts
- 5. Rhule 5,254 posts
- 6. Happy Halloween 284K posts
- 7. Scream 7 41.5K posts
- 8. #Prop50VoteYes 4,565 posts
- 9. Usha 31.8K posts
- 10. Somalia 59K posts
- 11. $AAPL 82.9K posts
- 12. Necas 2,719 posts
- 13. Andrew Mountbatten Windsor 5,581 posts
- 14. Royal Lodge 5,820 posts
- 15. Bill Kristol 1,395 posts
- 16. Poot 11.8K posts
- 17. Heritage 41.4K posts
- 18. Animal Crossing 31K posts
- 19. Buckingham Palace 5,991 posts
- 20. NextNRG Inc 2,197 posts
You might like
Something went wrong.
Something went wrong.