JavaScript Mastery from Zero to Hero - Prepare for Coding Interviews - Final Exercise - Facebook Unfriend Functionality

JavaScript Mastery from Zero to Hero - Prepare for Coding Interviews - Final Exercise - Facebook Unfriend Functionality

Assessment

Interactive Video

Information Technology (IT), Architecture

University

Practice Problem

Hard

Created by

Wayground Content

FREE Resource

This video tutorial guides viewers through a JavaScript exercise focused on creating a function to unfriend users on a simulated Facebook platform. It begins with an introduction to the exercise, followed by a demonstration of the unfriending process on Facebook. The tutorial then details the structure of a Facebook user object, explaining its components like name, age, and friends list. Viewers are instructed on writing a function to dynamically remove a friend from the list, with emphasis on handling errors if the friend does not exist. The video concludes with a review of the exercise, reinforcing the concepts of objects and arrays in JavaScript.

Read more

5 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the primary focus of the exercise discussed in the video?

Adding new friends on Facebook

Updating profile information

Creating a new Facebook account

Unfriending someone on Facebook

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which attribute in the Facebook user object is crucial for the unfriending functionality?

Profile picture

Friends list

Date joined

Full name

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What should the unfriend function return if the specified friend does not exist?

A null value

An error message

The original friends list

A success message

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What are the two arguments that the unfriend function should take?

A friend's name and a date

A string and a boolean

An object and a number

An object and a friend's name

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the expected output of the unfriend function?

A confirmation message

The updated friends list

The user's profile picture

A list of all Facebook users

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?