ES2020 is here!
The fresh new and improved specification of JavaScript 🚀
Let me take you through some of the cool new things that we get!
These are my 5 favorite new features
🔥 Dynamic import
With this new feature, we can import JavaScript modules dynamically, as we need it.
This pattern is also known as code-splitting, and with ES2020 we can do this natively instead of relying on tools like Webpack.
🔥 Optional Chaining
With this feature, we can now access deeply nested properties without having to null-check.
Notice how 'quxBaz' becomes undefined instead of throwing a reference error.
🔥 Nullish Coalescing
With Nullish Coalescing, we can now evaluate values that are 'nullish', not just 'falsy'.
Notice how the variable 'foo' is falsy, but not nullish (null or undefined).
In some cases, we want to use fallbacks only in the case of null or undefined.
🔥 globalThis
If you want to reuse the same code across different runtimes, you'll run into trouble with the global object.
globalThis will reference 'window' in browsers, 'global' in Node.js, and 'self' in Web Workers.
Now we don't have to manually detect the runtime anymore.
🔥 Promise.allSettled
With this new member of Promise, we can accept an array of Promises and only resolve when all of them are settled. Either resolved or rejected.
This enables us to run all promises without caring if they're resolved or rejected.
Would you like to hear more about how you can improve your JavaScript and Node.js skills?
Maybe learn how to use your skills to create your own business?
8 great ways to create passive income from your coding skills!
These are good opportunities to start a side hustle since they require almost no initial investments.
Start hustling 🧵👇
1️⃣ Write articles on Medium
Teach others your wisdom through technical articles on Medium.
You can choose to put the most popular ones behind a paywall.
Good writers can generate up to $6000/month in passive income.
2️⃣ Create themes
CMS-Systems like WordPress, Joomla, and Drupal are still widely used.
Create themes and sell them on Envato Market.
Some top-sellers make a substantial amount of money on this 👇 themeforest.net
It supports both key-value entries and documents.
That means that a field can contain a single value, such as a string or a number, but can also contain a document, i.e. a JSON-object.
Contributing to Open-Source can be an important career move!
It will signal that you're great at collaborating - a skill that is even more important than being good at coding!
If any questions or problems arrises, my DM will be open.
Happy hacking!
On Twitter API Client
1️⃣ Add tweet_mode parameter
2️⃣ Store credentials per instance to allow multiple clients.
Keep these in mind when you start writing 👇
Checklist, rules, and recommendations 🧵
(Repost)
Decide on:
☑️ Subject: What are you writing about?
☑️ Target: Who are you writing for?
☑️ Goal: What do you want to achieve?
☑️ Tone: How do you want to come across?
Checklist:
✅ Do you have a short and precise headline?
✅ Do you have an enticing introduction?
✅ Do you fulfill a promise in the conclusion?
✅ Do you have a "tweetable" wrap-up?
✅ Is your language colorful and interesting?
✅ Do you apply pathos/ethos/logos?
Keep these in mind when you start writing 👇
Checklist, rules, and recommendations 🧵
Decide on:
☑️ Subject: What are you writing about?
☑️ Target: Who are you writing for?
☑️ Goal: What do you want to achieve?
☑️ Tone: How do you want to come across?
Checklist:
✅ Do you have a short and precise headline?
✅ Do you have an enticing introduction?
✅ Do you fulfill a promise in the conclusion?
✅ Do you have a "tweetable" wrap-up?
✅ Is your language colorful and interesting?
✅ Do you apply pathos/ethos/logos?