Programming ConceptsFunction

A function is a reusable block of code that performs a specific task. Functions help keep code modular and organized.

function greet(name) {
  return `Hello, ${name}!`;
}
console.log(greet('Bob'));