Multiple choice

Which function will open an alert dialog with the message "Warning!"

  1. alert ("Warning)';

  2. alert (Warning!)

  3. alert("Warning!");

  4. alert ("Warning) )';

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

The alert function requires the message to be enclosed in quotes and parentheses, followed by a semicolon.