Bite sized JavaScript tutorials for busy developers Follow us on Substack: masteringjs.substack.com

null
The Mastering JS website is 100% open source. Check it out on GitHub, and please star our repo! github.com/mastering-js/mast…
Webpack Plugins are handy for switching configs between dev and prod. For example, here's how we switch API urls between localhost and prod in one of our projects. Learn about webpack plugins 👉 masteringjs.io/tutorials/web… #JavaScript #CodeNewbie
1
1
1
Love our tutorials? Sign up for our weekly newsletter and never miss a tutorial! getrevue.co/profile/masterin…
If you can't use async functions in Mocha for some reason, you can always use `done()`-style callbacks Learn more 👉 masteringjs.io/tutorials/moc…
1
Mastering JS retweeted
To determine whether a value is an array in JavaScript, use `Array.isArray()`. Not `instanceof Array`. Here's why 👉 masteringjs.io/tutorials/fun… #JavaScript #CodeNewbie
1
3
3
Love our tutorials? Sign up for our weekly newsletter and never miss a tutorial! getrevue.co/profile/masterin…
Webpack is handy for converting npm packages into something that can run in the browser. For example, we webpacked the below file to build our JSON to YAML converter: masteringjs.io/tutorials/too… #JavaScript #CodeNewbie
2
Easiest way to empty an array in JavaScript: set the length to 0. You can also use `splice()`, or just overwrite the array. Learn more 👉 masteringjs.io/tutorials/fun… #JavaScript #CodeNewbie
1
1
Mastering JS retweeted
For your convenience, we have a hosted collection of the @VueJS logo in different formats, transparencies, etc. 👉 masteringjs.io/tutorials/vue… #VueJS #JavaScript
1
2
3
Replying to @vuejs
The Mastering JS website is 100% open source. Check it out on GitHub, and please star our repo! github.com/mastering-js/mast…
When writing tests, we usually use Sinon stubs, as opposed to mocks or spies. Stubs are slightly different than mocks and spies. Learn more 👉 masteringjs.io/tutorials/sin… #JavaScript #CodeNewbie
1
1
The Mastering JS website is 100% open source. Check it out on GitHub, and please star our repo! github.com/mastering-js/mast…
Mastering JS retweeted
The spread operator is the most syntactically concise way to shallow clone an object. Learn more 👉 masteringjs.io/tutorials/fun… #JavaScript #CodeNewbie
1
3
2
The Mastering JS website is 100% open source. Check it out on GitHub, and please star our repo! github.com/mastering-js/mast…
Reminder: `typeof null` is 'object' in JavaScript. Make sure you check for `null` if you rely on `typeof null` Learn more 👉 masteringjs.io/tutorials/fun… Also masteringjs.io/tutorials/fun… #JavaScript #CodeNewbie
1
2
1