A function is a block of code designed to perform a specific task, and it runs only you call it, it uses to reduce the code repetition.
A function includes function keyword, function name, followed by parenthesis(), followed by curly brackets{}.
Syntax:
function name (){
}
Example:
function dish(){
console.log(" ready")
}
dish()
Top comments (0)