<your_account>
with your Github username in the link
npm run test
command to test your code;npm run test:only -- -n
to run fast test ignoring linter;npm run test:only -- -l
to run fast test with additional info in console ignoring linter.To inform the user about the success of the operation, or any errors, websites usually use messages that appear for a while on the screen.
Your task: Create function pushNotification
, which takes coordinates of the message, title, description, and type
(success, error and warning). pushNotification
creates an element to display the message, appends it to the document, and removes it from the DOM after 2 seconds.
Do not write any CSS styles or HTML code in this task. You should modify only main.js
file.
Implementation tips:
success
, error
, warning
(call methods already exist in main.js
file);notification
+ class which depends on the input parameter type (success
, error
, warning
); title
(prefer h2
element);p
).Hint: use setTimeout for execute a function or specified piece of code once the timer expires.
It's an expected result of your job: