Запуск функции с параметром и комбинацией символов - PullRequest
0 голосов
/ 29 мая 2020

Каждый раз, когда я запускаю функцию в Visual Studio Code, она говорит: «Адам не определен». Как я могу это исправить, чтобы было написано: «Привет, Адам! Это мой рецепт соуса маринара!» Вот мой код:

function marinaraSauce(cookName){
   console.log('Hey, ' + cookName + '!' + 'This is my marinara sauce recipe!');
console.log('-Heat a medium-large saucepan over medium heat.');
console.log('- Add 2 tspns of oil and 5 carlic cloves, cook until golden, about 2 minutes')
console.log(' - Add 1/4 cup water, 2 cans of crushed tomates, and salt and season with black pepper to taste.')
console.log(' - Cover the pot, bring to a boil, reduce the heat to medium low, and simmer until the sauce is heated, about 10 minutes')
console.log('- Stir in 1/4 cup roughly chopped fresh basil, salt and pepper as needed.')
}
marinaraSauce("Adam");
...