Functions

function, return, and defaults.

function declares a name. return sends a value back. Always log the return.

Goal

Write greet and a units total.

function greet(name) {
  return "Hello, " + name;
}
console.log(greet("Nairobi"));
function total(units, price) {
  return units * price;
}
console.log(total(12, 40));
function label(city = "Nairobi") {
  return city + " kiosk";
}
console.log(label());
console.log(label("Kisumu"));
function add(a, b) {
  return a + b;
}
console.log(add(8, 5));