Multiple choice technology web technology

How do you create a function?

  1. function myFunction()

  2. function=myFunction()

  3. function:myFunction()

  4. function myFunction

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

Functions in JavaScript are created using the 'function' keyword followed by the function name and parentheses: function myFunction(). The equals sign or colon are not part of function declaration syntax.