Modern Web Design with HTML5, CSS3, and JavaScript - Creating a Simple Game 'Switch Friends' with JavaScript - Coding Ch

Modern Web Design with HTML5, CSS3, and JavaScript - Creating a Simple Game 'Switch Friends' with JavaScript - Coding Ch

Assessment

Interactive Video

Information Technology (IT), Architecture

University

Hard

Created by

Quizizz Content

FREE Resource

The video tutorial explains how to use switch statements in JavaScript to check if a given name is in a list of friends. It starts by declaring a variable for a person's name and then uses a prompt to get user input. The switch statement checks the input against predefined cases for friends' names and outputs a message indicating whether the person is a friend. The tutorial also covers debugging the code by adding break statements to ensure correct functionality.

Read more

5 questions

Show all answers

1.

OPEN ENDED QUESTION

3 mins • 1 pt

What happens if a name entered is not in the friends list?

Evaluate responses using AI:

OFF

2.

OPEN ENDED QUESTION

3 mins • 1 pt

What is the purpose of the switch statement in the application?

Evaluate responses using AI:

OFF

3.

OPEN ENDED QUESTION

3 mins • 1 pt

List the names of the friends that are checked in the switch cases.

Evaluate responses using AI:

OFF

4.

OPEN ENDED QUESTION

3 mins • 1 pt

What error was encountered when checking for Lawrence's friendship?

Evaluate responses using AI:

OFF

5.

OPEN ENDED QUESTION

3 mins • 1 pt

Explain how the prompt is used in the application.

Evaluate responses using AI:

OFF