Exercise on ES6 Promises

In the following exercises, we will practice promises by handling success and failure in data retrieval.

Exercise 1:

List the names of the users retrieved via this endpoint using ajax.

Make sure you don’t use jQuery, and you use promises to handle success and failure. Place the names in the div below, having a class .js-names, and separate them with a simple comma. Make sure you do not use jQuery to access or modify the content of the below div.

<div style="border:1px black solid;" 
     class="js-names"></div>

Level up your interview prep. Join Educative to access 70+ hands-on prep courses.