The Purge Protocol

Easy+15 XP

Mission Briefing

The databanks have been compromised! A highly sensitive password property is currently exposed on the user profiles. You must write a purge protocol to wipe it permanently!

The Concept: Object Cleanup

The delete keyword forcefully and permanently removes a key-value property entirely from an object. Example: delete user.age; // The 'age' property is gone forever

The Objective

Your function receives a user object.

  1. Use the delete keyword to destroy the property exactly named "password".
  2. Return the safely cleaned user object.

01EXAMPLE 1

Inputuser = { name: "Ali", password: "123" }
Output{ name: "Ali" }

Constraints

  • Use the delete keyword.
FundamentalsObjects
JavaScript
Loading...
3 Hidden

Input Arguments

user{"user":"Ali","password":"123"}

Expected Output

{"user":"Ali"}

Click RUN to test your solution