script.js
const tasks = [
{ id: 1, description: 'Buy Grocery' },
{ id: 2, description: 'Create a blog post'},
{ id: 3, description: 'Make a thumbnail' },
{ id: 4, description: 'Share on Twitter' }
];
const filteredTasks = tasks.filter(task => {
return task.id != 3;
})
console.log(filteredTasks);
@username
Title of Code Snippet Goes here
Code Highlight:
This code defines an array of tasks with id and description properties. It then filters out the task with id equal to 3 and stores the filtered tasks in a new array called filteredTasks.