A JavaScript function is a block of code designed to perform a particular task. A JavaScript function is executed when “something” invokes it (calls it). Example

function myFunction(p1, p2) {
return p1 * p2; // The function returns the product of p1 and p2
}

bukola kehinde

Bukola is a software developer, fashion designer, speaker and writer.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store