curriculum/challenges/english/blocks/workshop-recipe-tracker/66fbcf750a62784cf11f562e.md
Create a recipe2 object with the following properties and values:
| Key | Value |
|---|---|
name | Chicken Curry |
ingredients | ["chicken breast", "coconut milk", "curry powder", "onion", "garlic"] |
cookingTime | 42 |
totalIngredients | null |
difficultyLevel | "" |
You should create an object named recipe2.
assert.isObject(recipe2);
Your recipe2 object should have a name property.
assert.property(recipe2, "name");
Your name property should be set to Chicken Curry.
assert.equal(recipe2.name, "Chicken Curry");
Your recipe2 object should have an ingredients property.
assert.property(recipe2, "ingredients");
Your ingredients property should have an array value.
assert.isArray(recipe2.ingredients);
The array value of your ingredients property should have chicken breast, coconut milk, curry powder, onion and garlic in it.
assert.deepEqual(recipe2.ingredients, ["chicken breast", "coconut milk", "curry powder", "onion", "garlic"]);
Your recipe2 object should have a cookingTime property.
assert.property(recipe2, "cookingTime");
Your cookingTime property value should be a number.
assert.isNumber(recipe2.cookingTime);
Your cookingTime property should be set to 42.
assert.equal(recipe2.cookingTime, 42);
Your recipe2 object should have a totalIngredients property.
assert.property(recipe2, "totalIngredients");
Your totalIngredients property should be set to null.
assert.isNull(recipe2.totalIngredients);
Your recipe2 object should have a difficultyLevel property.
assert.property(recipe2, "difficultyLevel");
Your difficultyLevel property should be set to an empty string.
assert.deepEqual(recipe2.difficultyLevel, "");
const recipes = [];
const recipe1 = {
name: "Spaghetti Carbonara",
ingredients: ["spaghetti", "Parmesan cheese", "pancetta", "black pepper"],
cookingTime: 22,
totalIngredients: null,
difficultyLevel: ""
};
--fcc-editable-region--
--fcc-editable-region--