A function declaration is code that stipulates what the function can do
Use the function
keyword to define a function
Functions can be given a name
The name must be followed by parentheses
The opening and closing curly braces indicate a “code block”
The statements for your function goes within the code block
Also referred to as “defining a function”
Simply declaring the function will not run this code, this function must be called in order for the code inside the function to be run
// declare a function named sayGoodMorning()
function sayGoodMorning() {
console.log("Good Morning")
}
bark
that prints (via console.log()) 'Woof, Woof'