Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
const input = [pineapple, onion, lettuce, apple];
const main = (input) => {
const output = [];
// check if the element is a veggie
// if is veggie do not push into result
// else push into result return output;
}
console.log(main(input))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.