Skip to content

Latest commit

 

History

History
executable file
·
9 lines (7 loc) · 772 Bytes

File metadata and controls

executable file
·
9 lines (7 loc) · 772 Bytes

Which of the following alert() statements return "Beware!"? <<

( )

alert(Beware!);
{{Incorrect because the statement does not adhere to JavaScript syntax, "Beware!" should be enclosed with quotation marks.}} ( )
alert -> Beware!
{{Incorrect because the statement does not adhere to JavaScript syntax.}} ( )
alert();
{{Incorrect because the statement does not print a message with the alert box.}} (x)
alert("Beware!");
{{Correct because the statement prints "Beware!" as an alert box.}} ( )
alertBeware();
{{Incorrect because this function does not exist in JavaScript.}}

||The syntax of the alert() method is shown in the sample code above. ||