- A) let myFunction = () => {};
- B) var myFunction == () => {};
- C) myFunction = () => {};
- D) declare myFunction = () => {};
Answer: A) let myFunction = () => {};
Explanation: the correct syntax for declaring a function in JavaScript is "let myFunction = () => {}". The "let" keyword is used to declare a function, followed by the name of the function and then the function body enclosed using curly braces.
Comments (0)