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

null
Pro tip: never, ever, use Mocha's `skip()` or `only()` functions to pick which tests to run The `-g` flag lets you search tests by RegExp, use that instead Learn more about Mocha 👉 masteringjs.io/tutorials/moc… #JavaScript #CodeNewbie
1
Common cause of bugs with @mongoosejs aggregations: `await Model.aggregate()` can return an empty array if there's no results. Learn more 👉 masteringjs.io/tutorials/mon… #MongoDB #NodeJS
1
JavaScript's spread operator works with function arguments. Handy for calling functions that expect a spread of arguments when you have an array, like `unshift()`. More about unshift 👉 masteringjs.io/tutorials/fun… More about spread 👉 masteringjs.io/tutorials/fun… #JavaScript #CodeNewbie
1
Mastering JS retweeted
🆕 Array Unshift in JavaScript: masteringjs.io/tutorials/fun… #JavaScript #CodeNewbie
1
2
2
The Mastering JS website is 100% open source. Check it out on GitHub, and please star our repo! github.com/mastering-js/mast…
Pro tip: WeakMaps are a great alternative to adding random properties or symbols to objects. Map from object to value, without adding a property that messes with debug output #JavaScript #CodeNewbie
1
1
1
Love our tutorials? Sign up for our weekly newsletter and never miss a tutorial! getrevue.co/profile/masterin…
Here's how we check whether a function is an async function using prototypes. More about async/await 👉 masteringjs.io/tutorials/fun… #JavaScript #CodeNewbie
1
The Mastering JS website is 100% open source. Check it out on GitHub, and please star our repo! github.com/mastering-js/mast…
Remember that `void` is NOT a function in JavaScript. Even though `void(0)` is valid. Learn more 👉 masteringjs.io/tutorials/fun… #JavaScript #CodeNewbie
1
1
1
Want to be able to `require()` or `import` HTML files in Webpack? Add a rule of type 'asset/source' to `.html` files. No need for html-loader. Learn more about running Webpack from Node.js 👉 masteringjs.io/tutorials/web… #JavaScript #CodeNewbie
1
Mastering JS retweeted
1
3
1
Love our tutorials? Sign up for our weekly newsletter and never miss a tutorial! getrevue.co/profile/masterin…
1
Mastering JS retweeted
Pro tip for developers: 1) Start a blog 2) Write about the problems you've solved 3) Become known as an "expert" bc you helped people solve problems faster #JavaScript #CodeNewbie
1
2
6
Love our tutorials? Sign up for our weekly newsletter and never miss a tutorial! getrevue.co/profile/masterin…
Mastering JS retweeted
🆕 Shuffle an Array in JavasScript: masteringjs.io/tutorials/fun… #JavaScript #CodeNewbie
2
4
3