Functions are blocks of code designed to perform a task. They help keep your code organized and reusable.
function greet() {
alert("Hello, welcome!");
}
Functions prevent repetition and make programs easier to manage. Almost every real-world JavaScript application depends on functions.