Remove from list
Function: Remove from list
This action allows you to easily remove a specific item from any list you have in your application. It's useful for managing collections of data where you need to take out a particular entry.
Input,
- List: This is the collection of items (an ARRAY) from which you want to remove something.
- Item: This is the specific item (a VARIABLE) that you want to take out of the list. This input is required.
Output,
- Result: This is the updated list (an ARRAY) after the specified item has been removed.
Execution Flow,
Real-Life Examples,
Example 1: Removing a product from a shopping cart
Imagine you have a list of items in a customer's shopping cart, and the customer decides to remove one of them.
- Inputs:
- List:
["Laptop", "Mouse", "Keyboard", "Webcam"] - Item:
"Mouse"
- List:
- Result: The shopping cart list is updated to
["Laptop", "Keyboard", "Webcam"].
Example 2: Taking a completed task off a to-do list
You're managing a project's to-do list, and a team member finishes a task. You want to remove it from the active list.
- Inputs:
- List:
["Prepare presentation", "Send client email", "Review report", "Schedule meeting"] - Item:
"Send client email"
- List:
- Result: The to-do list is now
["Prepare presentation", "Review report", "Schedule meeting"].
Example 3: Removing an attendee from an event guest list
An attendee has canceled their registration for an event, and you need to update the guest list.
- Inputs:
- List:
["Alice Johnson", "Bob Williams", "Charlie Brown", "Diana Prince"] - Item:
"Charlie Brown"
- List:
- Result: The guest list is updated to
["Alice Johnson", "Bob Williams", "Diana Prince"].