3. Function syntax. Help me, please: "You did not call the greeting function." But I did!


First we declare a function using var, and then give it a name sayHello.

Then we use the function keyword to tell the computer that you are making a function

Then write your block of reusable code between { }.

// Below is the greeting function!
// See line 7
// We can join strings together using the plus sign (+)
// See the hint for more details about how this works.

var sayHi = function (name) {
console.log("Hi," + " " + name);

// On line 11, call the greeting function!

It is work, but I see "Oops, try again. You did not call the greeting function. Pass it a name!"(
I'm trying to solve this problem the second day

Function syntax

Looks like your function should be named greeting not sayHi.


Oh, thank you @haxor789!! It's work finally)