Let’s get the mail from the user, the question is Please, enter your email.

If the mail contains the @ symbol, check with the user if he wants to receive the newsletter.
The question should be like this - Do you want to receive our newsletter?, The window should have two buttons - Ok and Cancel.
When you click on Ok, we show alert with the message - Thank you for trust..
When you click on Cancel, we show alert with a message - Maybe next time..

If the mail does not contain the @ symbol, then the field for entering mail must be shown again.
Show it until the symbol is found.

Use your inner style.

This task is part of the Full-Stack JavaScript Course
If you have any issues with it, you can ask for community help below the post
Feel free to help others if you’ve already solved the task


<!DOCTYPE html>
    <title>Modals practice</title>
    <h2 style="text-align: center;">Open console</h2>