Failed request

Report a typo

Declare a promise named dataLoader that returns the text "An error occurred" in case of failure.

Sample Input 1:

Sample Output 1:

An error occurred
Write a program in JavaScript
//Write your code here
___

Create a free account to access the full topic