Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save coliveravenegas/be5a4284833b52931769f591719d6f84 to your computer and use it in GitHub Desktop.
Save coliveravenegas/be5a4284833b52931769f591719d6f84 to your computer and use it in GitHub Desktop.
booleanFunctions.js
const user = {
fruits: ['apple']
}
const hasFruit = (user, fruitName) => user.fruits.includes(fruitName);
/*Si la funcion ya se llama "hasFruit" que nombre le pondriamos a "x"? */
const x = hasFruit(user, 'apple');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment