Declare a promise named dataLoader that returns the text "An error occurred" in case of failure.
Introduction to Promises
Failed request
Report a typo
Sample Input 1:
Sample Output 1:
An error occurredWrite a program in JavaScript
//Write your code here
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.