JavaScript 💡

Let's take a look at the Promise API.
4 methods explained with examples below.

🧵👇
🔹 Promise.all()

The Promise.all() method takes an array of promises as an argument and returns a single Promise that resolves to an array of the results of the input promises.
🔹 Promise.allSettled()

The Promise.allSettled() method returns a promise that resolves after all of the given promises have either fulfilled or rejected, with an array of objects that each describes the outcome of each promise.
🔹 Promise.any()

The Promise.any() method takes an array of promises as an argument and, as soon as one of the promises fulfills, returns a single promise that resolves with the value from that promise.
🔹 Promise.race()

The Promise.race() method returns a promise that fulfills or rejects as soon as one of the promises in an array fulfills or rejects, with the value or reason from that promise.

• • •

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

3 Jun
Node.js Learning Path 🔥

Master these topics, and you'll be ready to take on your first job as a Node.js Back End Developer!

Let's go through them 🧵👇
🔸 JavaScript and Node.js fundamentals

This probably doesn't come as a surprise, but this is the first place to start.

Become familiar with:
- JavaScript ES6+ syntax
- Node.js 10+ fundamentals
🔹 JavaScript ES6+ syntax

You should be comfortable with:
- Arrow functions
- Promises (async/await)
- Modules
Read 17 tweets
2 Jun
Do you like my content here on Twitter?

I'm active on other social platforms as well!
Do you wanna connect or subscribe? 🤩

I've made a collection of links below 👇
You can find me on YouTube here 👇

I share every I know about bootstrapping a SaaS business 🔥

youtube.com/simonhoiberg
I'm also on Instagram 👇

I share more visual content here.
Tips and advice come in the form of images, slides, and stories.

instagram.com/simonhoiberg
Read 5 tweets
1 Jun
Create a SaaS product 🚀

What does it take to create a successful SaaS Product?

There's an infinite number of paths.
This is one of them 👇🧵 Image
🔸 Have a great idea

Find out which problem you want to solve.
Boil it down. Make it narrow and specific.

Don't be discouraged if your idea is already out there.
If there's already a market out there, see it as a confirmation that your product is needed.
🔸 Present your concept

Create wireframes and prototypes.

Now show the idea to the world.
You want confirmation that people are interested.

Show your family and friends.
Share on Twitter, LinkedIn, Reddit.

Read 13 tweets
25 May
🔥 Benefits of a Holding Company 🔥

Are you in the process of setting up a Limited Liability Company?

You may want to consider setting up a Holding Company as well.

Here's why 🧵👇
First of all - what is a Holding Company?

Well, a Holding Company is not a specific form of company (like an LLC or an INC).

It's simply a company that owns shares in another company and doesn't produce or offer any services itself.
A Holding Company is typically positioned between the operating company and the individual shareholder.

Let's take an example.
@SimonGronborg, and I are Co-Founding FeedHive.

Below is an illustration of our company structure 👇
Read 14 tweets
4 May
JavaScript 💡

14 Array Methods that will make your life easier.
Explanation and examples below.

🧵👇
🔸 map

The map() method creates a new array populated with the return value of the callback function for each element in the array.
🔸 forEach

The forEach() method executes a provided function once for each array element.
The callback function does not expect a return value, and the forEach() method itself also returns undefined.
Read 16 tweets
8 Apr
8 JavaScript Concepts you need to be familiar with!

🔸 Scopes
🔸 Closures
🔸 Reference/Pointers
🔸 This
🔸 Prototypes & Inheritance
🔸 Async/Await (Promises)
🔸 Higher-order Functions
🔸 Event Propagation

🧵👇
Read 10 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

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

Donate via Paypal Become our Patreon

Thank you for your support!

Follow Us on Twitter!

:(