scrimba
Introduction to ES6+
includes() (Challenge)
Go Pro!Bootcamp

Bootcamp

Study group

Collaborate with peers in your dedicated #study-group channel.

Code reviews

Submit projects for review using the /review command in your #code-reviews channel

includes() (Challenge)
AboutCommentsNotes
includes() (Challenge)
Expand for more info
index.js
run
preview
console
/*
** includes() Challenge
* You want to make a chocolate cake
* And you have a list of ingredients represented with an array
* Using the JavaScript includes() function
* Check if you have the ingredient chocolate in your list of ingredients, and print into the console "We are going to make a chocolate cake" if you have it
* Else print into the console "We can't make a chocolate cake because we are missing the ingredient chocolate"
*/

const listIngredients = [ "flour", "sugar", "eggs", "butter" ];
Console
/index.html
-2:19