You could use something like promises.
.then(result => console.log(result))
.catch(err => console.log(err));
Ooh. That's right. Forgot promises could do that😅. Thanks 😊
We’re a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.