Returns a new array excluding items where a given property matches a specific value.
The original array to filter.
The property of each item to check.
The value to exclude from the result.
A new array containing all items except those matching the exclude value.
const nonAdmins = allExcept(users, 'role', 'admin'); Copy
const nonAdmins = allExcept(users, 'role', 'admin');
Returns a new array excluding items where a given property matches a specific value.