Programming Concepts — Function
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'));
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'));