REVIEWER

REVIEWER

Assessment

Flashcard

Information Technology (IT)

University

Hard

Created by

Quizizz Content

FREE Resource

Student preview

quiz-placeholder

39 questions

Show all answers

1.

FLASHCARD QUESTION

Front

What will the following code display in the browser?
alert("Hello, World!");

Back

A message box with "Hello, World!"

2.

FLASHCARD QUESTION

Front

Which method is used to display a prompt box in JavaScript?

Back

alert()

3.

FLASHCARD QUESTION

Front

What is the result when the user clicks 'Cancel' in a confirm() box?

Back

false

4.

FLASHCARD QUESTION

Front

What will happen if a user enters a value in a prompt() box and clicks "OK"?

Back

The value entered will be returned as a string

5.

FLASHCARD QUESTION

Front

Which event is triggered when a user clicks a button on a webpage?

Back

onclick

6.

FLASHCARD QUESTION

Front

What is the purpose of the addEventListener() method in JavaScript?

Back

It attaches an event handler to an element.

7.

FLASHCARD QUESTION

Front

Which of the following is the correct way to call a function when a button is clicked using addEventListener()? Options: <button onclick="myFunction()">Click me</button>, button.addEventListener("click", myFunction);, <button onClick="myFunction()">Click me</button>, addEventListener("click", myFunction());

Back

button.addEventListener("click", myFunction);

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?