yatania / js_promise_basic_DOM

Create the firstest promises

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

  1. Replace <your_account> with your Github username in the link
  2. Follow this instructions
    • Run npm run test command to test your code;
    • Run npm run test:only -- -n to run fast test ignoring linter;
    • Run npm run test:only -- -l to run fast test with additional info in console ignoring linter.

Task: First promises

In this task you should create 2 promises.

  1. The first promise should be resolved on a click on .logo.
  2. The second promise should be rejected in 3 seconds.

That's all.

Implementation tips:

  • print two messages to notify a user about resolved or rejected promise;
  • the message is block element with class message for the resolved promise and error-message for the rejected promise;
  • the message about resolved promise should not disappear;
  • the messages should have text Promise was resolved! and Promise was rejected!.

About

Create the firstest promises

License:GNU General Public License v3.0


Languages

Language:JavaScript 44.8%Language:SCSS 36.9%Language:HTML 18.3%