Simon Høiberg Profile picture
Sep 16, 2021 11 tweets 4 min read Read on X
JavaScript ES2021 🚀
It's here!!

Are you up to speed with some of the cool new features we got in ES2021?

Let's take a look 👇🧵
JavaScript ES2021 (or ES12) - was published in June 2021 and introduces some cool new features to the JavaScript language.

Should you care?!

Well, it's not groundbreaking (like ES6), but it does introduce some features that you should familiarize yourself with.

Let's dive in!
🔸 String.prototype.replaceAll()

The current 'String.prototype.replace()' method only replaces the first occurrence, unless a regular expression with a global modifier is provided.

With the new 'String.prototype.replaceAll()' method, we can finally omit the regex 👇
🔸 Private Methods

When a method name starts with '#', we declare them private.
Private methods can only be accessed from within the class they're defined 👇
🔸 Private Accessors

Similar to Private Methods, accessor functions can be made private by prepending # to the function name as well 👇
🔸 Promise.any()

You probably already know how to use 'Promise.all()' to await all Promises from a list to resolve.

With Promise.any(), we can await a list of Promises, but resolve as soon as one of the Promises in the list resolves 👇
🔸 Logical Assignment Operator (&&)

The new Logical Assignment Operator combines logical operations (&& / || / ??) with assignments.

Let's take a look below, using && 👇
🔸 Logical Assignment Operator (||)

Similarly, we can use the new Logical Assignment Operator with || 👇
🔸 Logical Assignment Operator (??)

Finally, we can use it in combination with the Nullish Coalescing Operator 👇
There are two additional new features, 'WeakRef' and 'Finalizers', which are a bit too complex to explain here.
But I highly recommend looking them up!

What do you think of these new features? 🤩
Will you be using them?

Share your thoughts below.
If you're using ESNEXT in your projects, you're probably already using some of these. I think they are really cool 🙌

I hope you enjoyed reading!

Take a second to like and retweet this thread.
In that way, people from your own network get to enjoy as well.

Thank you 🙏

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Simon Høiberg

Simon Høiberg Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @SimonHoiberg

Mar 14, 2023
GPT-4 is about to launch 🚀
And we're going to see something groundbreaking!

According to early announcements, GPT-4 is going to be multimodal, which means both prompts and outputs can be:

→ Text
→ Images
→ Videos
→ Audio

Instead of simply text → text as we know now. Image
Let's gooo 🚀 Image
Read 4 tweets
Mar 13, 2023
How to validate your SaaS idea *before* you start building.

→ In less than 10 days
→ For less than $200
→ In 3 simple steps

Let's see how 🧵👇
Step 1: Set up a landing page.

Describe your product idea, the features, and the problem you want to solve.

Tools:
shuffle.dev to create the landing page
chat.openai.com to create the copy
figma.com to create the graphics
On the pricing page, include a simple form to join the waiting list for your product.

Use this to collect emails.

Tools:
zapier.com to handle form submissions
airtable.com to store the emails
Read 12 tweets
Jan 11, 2023
GPT-4 is going to launch soon.
And it will make ChatGPT look like a toy...

→ GPT-3 has 175 billion parameters
→ GPT-4 has 100 trillion parameters

I think we're gonna see something absolutely mindblowing this time!

And the best part? 👇
Average developers (like myself), who are not AI or machine learning experts, will get to use this powerful technology through a simple API.

Think about this for a second...

It's the most powerful, cutting-edge technology *in the world*, available through a Low-Code solution!
If you're not already planning on starting an AI-based SaaS or thinking about how to build AI into your current solution...

👉 Start now!

Cause this is gonna be one of the biggest opportunities of this century 🚀
Read 4 tweets
Dec 27, 2022
I run a 6-figure business entirely online.

But the amount of hats I need to wear is exhausting 🤯

Luckily, I can be a:
→ Copywriter
→ Data analyst
→ Social media manager
→ Head of Operations
→ Graphic designer
→ VP of Finance
→ Web developer

...using these 7 tools ↓
🔹 TubeBuddy

I couldn't imagine running YouTube as a business without TubeBuddy.

Keyword research, channel analytics, thumbnail analysis, A/B testing and much more.

🔗 tubebuddy.com
🔹 FeedHive

FeedHive is the ultimate tool for entrepreneurs who want to build a social media presence at scale.

I gained +200K followers across 5 different platforms in < 2 years.

I've seen people go viral with FeedHive more times than I can count.

🔗 feedhive.io
Read 9 tweets
Nov 28, 2022
8 No Code tools you can use to set up a SaaS business from scratch!

🌐 Website
⚙️ Web app
📱 Mobile app
🔁 Automation

(...I bet some of these are new to you)

Let's take a look ↓
🌐 Create a stunning website for your business!

→ Shuffe (shuffle.dev)
→ Versoly (versoly.com)
⚙️ Create the actual SaaS web application.

→ Bubble (bubble.io)
→ Wized (wized.io)
Read 7 tweets
Nov 8, 2022
How to validate your SaaS idea *before* you start building.

→ In less than 10 days
→ For less than $200
→ In 3 simple steps

Let's see how 🧵👇
Step 1: Set up a landing page.

Describe your product idea, the features, and the problem you want to solve.

Tools:
shuffle.dev to create the landing page.
copy.ai to create the copy.
figma.com to create the graphics.
On the pricing page, include a simple form to join the waiting list for your product.

Use this to collect emails.

Tools:
zapier.com to handle form submissions.
airtable.com to store the emails.
Read 13 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us!

:(