To inform the user about the success of the operation or any errors, websites typically use messages that appear on the screen for a short period.
Your task: Create a function pushNotification, which takes the 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 hides it from the DOM after 2 seconds.
Do not write any CSS styles or HTML code in this task. You should modify only the main.js file.
Implementation guideline:
- Print three messages:
success,error,warning(call methods already exist in themain.jsfile); - The message is a block element with class
notification+ class, which depends on the input parameter type (success,error,warning); - The message should have a title with class
title(preferh2element); - The message should have a description (prefer tag
p); - Use setTimeout to execute a function or specified piece of code once the timer expires;
- Important: Do not remove elements from the DOM in this task; instead, use style attributes just to hide messages visually (f.e,
displayorvisibilityproperties).
It's an expected result of your job:

- Replace
<your_account>with your GitHub username in the link - Follow this instructions
- Run
npm run testcommand to test your code; - Run
npm run test:only -- -nto run fast test ignoring linter; - Run
npm run test:only -- -lto run fast test with additional info in console, ignoring linter.
- Run