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

null
Browser tools are great for solving one-off problems: ⏩ Nothing to install 😎 (Hopefully) intuitive UI means no docs to read 🔎 Searchable on Google Check out our decimal to binary converter 👉 masteringjs.io/tutorials/fun… #JavaScript #CodeNewbie
1
1
Mastering JS retweeted
Pro tip: you can use `filter()` to quickly determine the difference between 2 sets in JavaScript More about `filter()` 👉 masteringjs.io/tutorials/fun… #JavaScript #CodeNewbie
1
2
3
Love our tutorials? Sign up for our weekly newsletter and never miss a tutorial! getrevue.co/profile/masterin…
Pro tip: if you want to do distributed locking in Mongoose, use `findOneAndUpdate()`, not a separate `findOne()` and `update()`. `findOneAndUpdate()` is atomic, whereas `findOne()` then `update()` is a race condition 👉 masteringjs.io/tutorials/mon… #MongoDB #CodeNewbie
1
1
Need to make an environment variable falsy from the command line? Just do `env MY_ENV_VAR=` . That way MY_ENV_VAR will be an empty string, which is falsy. More about falsy in JavaScript 👉 masteringjs.io/tutorials/fun… #NodeJS #MongoDB #JavaScript
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…
1
Easiest way to compare if 2 arrays of JavaScript primitives (strings, numbers, etc.) are equal: masteringjs.io/tutorials/fun… #JavaScript #CodeNewbie
1
1
Pro tip: if you want to make a Vue component show up and are too lazy to configure the app state to show the component, you can always just put the v-show logic behind a computed property, and make that computed property always return true. #VueJS #CodeNewbie
1
1
Love our tutorials? Sign up for our weekly newsletter and never miss a tutorial! getrevue.co/profile/masterin…
7 years later, we finally understand the difference between spies and stubs in Sinon 😎 masteringjs.io/tutorials/sin… #JavaScript #CodeNewbie
1
3
1
The Mastering JS website is 100% open source. Check it out on GitHub, and please star our repo! github.com/mastering-js/mast…
1
Tired of pasting the same URL all over your #VueJS codebase? Just put it on `app.config.globalProperties`, makes it easy to access the same static property in every component. #JavaScript #CodeNewbie
1
1
5
Mastering JS retweeted
Annoying #VueJS gotcha that cost us some time recently: you can't name a component "footer". Worked around it by naming it "footer-component" github.com/vuejs/vue/issues/… #JavaScript #CodeNewbie
2
3
3
The Mastering JS website is 100% open source. Check it out on GitHub, and please star our repo! github.com/mastering-js/mast…