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

null
Check out our JSON to YAML converter and let us know what you think! masteringjs.io/tutorials/too… #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…
We recommend using `unshift()` to add elements to the beginning of a JavaScript array. Here's why 👉 masteringjs.io/tutorials/fun… #JavaScript #CodeNewbie
1
1
2
Unfortunate gotcha with JavaScript's `charAt()` function: if you call `charAt()` with a value that cannot be converted to a number, `charAt()` will always return the first character. Learn more 👉 masteringjs.io/tutorials/fun… #JavaScript #CodeNewbie
2
1
The new `replaceAll()` method is helpful, but it doesn't entirely remove the need for RegExp's `/g` flag. Learn more 👉 masteringjs.io/tutorials/fun… #JavaScript #CodeNewbie
1
Here's a minimum viable ChartJS bar chart. This is usually our starting point for any chart. Learn more about resizing ChartJS charts 👉 masteringjs.io/tutorials/cha… #JavaScript #CodeNewbie
2
Love our tutorials? Sign up for our weekly newsletter and never miss a tutorial! getrevue.co/profile/masterin…
If the answer is 42, perhaps the question is "What is 101010 in decimal?" 🤔 That's what our binary to decimal converter is for 👉 masteringjs.io/tutorials/too… #JavaScript
1
1
Mastering JS retweeted
Want to know where a function is called from without using a debugger? Create a new Error object and print out the stack trace. We do this probably 20x/day #JavaScript #CodeNewbie
1
2
2
Love our tutorials? Sign up for our weekly newsletter and never miss a tutorial! getrevue.co/profile/masterin…
Mastering JS retweeted
The `Promise.race()` function is great for implementing custom timeouts on async ops For example, here's some code we wrote to make Bull.js initial connection time out if it can't connect after 10s More about promises 👉 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…