Build a Recipe Tracker - Step 6

Tell us what’s happening:

hi,can someone help me with this? ive already tried to change to const,function You should create a recipe2CookingTime variable.
5. You should assign the value of the cookingTime property of recipe2 to your recipe2CookingTime variable.
6. You should log recipe2CookingTime to the console.
7. You should create a recipe3Ingredients variable.
8. You should assign the value of the ingredients property of recipe3 to your recipe3Ingredients variable.
9. You should log recipe3Ingredients to the console.

Your code so far

const recipes = [];

const recipe1 = {
  name: "Spaghetti Carbonara",
  ingredients: ["spaghetti", "Parmesan cheese", "pancetta", "black pepper"],
  cookingTime: 22,
  totalIngredients: null,
  difficultyLevel: ""
};

const recipe2 = {
  name: "Chicken Curry",
  ingredients: ["chicken breast", "coconut milk", "curry powder", "onion", "garlic"],
  cookingTime: 42,
  totalIngredients: null,
  difficultyLevel: ""
};

const recipe3 = {
  name: "Vegetable Stir Fry",
  ingredients: ["broccoli", "carrot", "bell pepper"],
  cookingTime: 15,
  totalIngredients: null,
  difficultyLevel: ""
};


// User Editable Region

let recipe1Name = recipe1.name;
let recipe2CookingTime = recipe2.CookingTime;
let recipe3Ingredients = recipe3.Ingredients
console.log(recipe1Name)


// User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36

Challenge Information:

Build a Recipe Tracker - Step 6

Your syntax is wrong for accessing. Check your case sensitivity. Check the example:

console.log(person.name); // John

You also need 3 console logs.

1 Like