JavaScript Tips (@JavaScriptWsdom) profile picture

Insightful and practical JavaScript wisdom.

Joined March 2013
JavaScript Tips retweeted
Which is your fav framework?
35%Angular
27%Vue
37%React
155 votes • Final results
2
9
10
JavaScript Tips retweeted
Let’s automate tasks with...
36%Gulp
60%Webpack
0%Rollup
4%Other (specify)
53 votes • Final results
2
1
You might not need jQuery, as post-IE8 browsers are pretty easy to deal with. Read more at youmightnotneedjquery.com
1
1
A great article from Douglass Crockford about using private members in JavaScript javascript.crockford.com/pri…
Testing in Chrome 36, Array.prototype.filter is 95% slower than a for loop jsperf.com/aarontgrogg-array…
Modern browsers adhering to ECMA Script 5.1 support the indexOf method on arrays. ecma-international.org/ecma-…
JavaScript doesn't have block scope; program accordingly.
String concatenation performance can vary dramatically from browser to browser. For example, run jsperf.com/string-concatenat… 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-un…
Instead of trying to decipher the Date API, just use Moment.js (momentjs.com/)
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])