JS

Functions in JavaScript - Function in javascript

2.

Which of the following is the correct way to define a function in JavaScript?

function myFunction{}

const myFunction = () => {}

const myFunction = function() {}

function myFunction() {}