Which JavaScript method displays an alert box?
Correct answer
B. alert()
15 views
B. alert()
15 views
alert() displays a message box with an OK button, e.g. alert("Hello");. prompt() asks the user for input, and console.log() writes to the browser console.
Keep preparing with more Computer Basics MCQs on MCQsExam.com.
Asked in: Matric,FBISE
Not sure why the answer is B? Ask here and get an explanation.