Let’s write a script that checks the number entered by the user for a match.
The message to enter must be
Enter number, initial value is
If the user did not enter a number, you need to show the
alert modal with the text:
Not a number.
If you entered a number, we check for pairing. If it is even, we show a modal window with the text
Even, otherwise -
Use the internal script.
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> <html> <head> <title>Modals practice</title> </head> <body> <h2 style="text-align: center;">Open console</h2> </body> </html>