A JavaScript function is a block of code designed to perform a particular task. A function is executed when something invokes (calls) it.
function name() {}const name = function() {}const name = () => {}Edit the code below and click Run to see the result live.