DEV Community

loading...

Discussion on: There's no "else if" in JS

kayis profile image
K

You could use something like promises.

someRequest(URL)
.then(result => console.log(result))
.catch(err => console.log(err));
Thread Thread
napoleon039 profile image
Nihar Raote

Ooh. That's right. Forgot promises could do thatπŸ˜…. Thanks 😊