What basic code is needed to define a function in JavaScript?
A.
function myFunction { }
B.
define myFunction() { }
C.
function myFunction() { }
D.
define myFunction { return value; }
Explanation:
What basic code is needed to define a function in JavaScript?
What basic code is needed to define a function in JavaScript?
A.
function myFunction { }
B.
define myFunction() { }
C.
function myFunction() { }
D.
define myFunction { return value; }
Explanation:
Correct – the function declaration, function name followed by parenthesis, and open close brackets are the correct syntax.