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

null
Love our tutorials? Sign up for our weekly newsletter and never miss a tutorial! getrevue.co/profile/masterin…
The Mastering JS website is 100% open source. Check it out on GitHub, and please star our repo! github.com/mastering-js/mast…
By default, JavaScript objects' `toString()` returns "[object Object]". Not useful Usually, the easiest fix is `JSON.stringify()`, but `Object.entries()` and Node.js' `require('util').inspect()` also work well Learn more 👉 masteringjs.io/tutorials/fun… #JavaScript #CodeNewbie
1
4
3
`42.toString()` throws a SyntaxError in JavaScript Wrap numbers in parens `()` if you want to call methods on a number literal Learn more 👉 masteringjs.io/tutorials/fun… #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 first 100% FREE Vue.js Conference is around the corner! 🎉 Join the @vuejsnation and explore the vast @vuejs ecosystem in 2022! Date: 26th & 27th January Tickets: FREE ✅ Interact with industry leaders LIVE including Evan You and Sebastien Chopin! vuejsnation.com/
1
4
5
Replying to @vuejsnation @vuejs
Love our tutorials? Sign up for our weekly newsletter and never miss a tutorial! getrevue.co/profile/masterin…
1
Be careful about using `trimStart()` and `trimEnd()` in JavaScript. These methods are relatively new additions to JavaScript, and break in older browsers and Node.js versions. Use `replace()` instead. Learn more 👉 masteringjs.io/tutorials/fun… #JavaScript #CodeNewbie
1
Remember: don't use tools that are made for "enterprise" devs if you're a solo dev. Using Angular 2 for a side project is like using a cargo tanker to go to the grocery store #JavaScript #CodeNewbie
1
Love our tutorials? Sign up for our weekly newsletter and never miss a tutorial! getrevue.co/profile/masterin…
1
🆕 How to Check if a Variable is an Integer in JavaScript: masteringjs.io/tutorials/fun… #JavaScript #CodeNewbie
1
3
2
Pro tip: you can pass arbitrary options to Mongoose's `populate()` function. This is useful for cases when you want to avoid infinite recursion in `populate()`. Learn more 👉 masteringjs.io/tutorials/mon… #MongoDB #NodeJS #CodeNewbie
1
1
Pro tip: you can avoid a bad version of a package by using `<` in semver #JavaScript #CodeNewbie
1
RegExp pro tip: `^` at the start of a set negates the set. For example, below is how you can test whether a string does NOT start with 'A'. masteringjs.io/tutorials/fun… #JavaScript #CodeNewbie
1
Love our tutorials? Sign up for our weekly newsletter and never miss a tutorial! getrevue.co/profile/masterin…
Sinon stubs have a `getCall()` method that returns information about a particular time the stub was called, including `args` and `returnValue`. Learn more 👉 masteringjs.io/tutorials/sin… #JavaScript #CodeNewbie
1
2
2