A block of code designed to perform a particular task
// Function declaration
function sayLastName() {
console.log('My last name is Gutierrez');
}
// Function expression
var sayName = function() {
console.log('My name is Matt');
};
// Function declaration
function sayLastName() {
console.log('My last name is Gutierrez');
}
sayLastName()
// Function expression
var sayName = function() {
console.log('My name is Matt');
};
sayName()Using the routine you thought of in the beginning of the class, make it into a function and console.log the steps of your routine
var sayName = function(firstName) {
console.log('My name is ' + firstName);
};
sayName('Matt')
// 'My name is Matt'
sayName('Mark')
// 'My name is Mark'Using the function you created, add some parameters