What basis code is needed to define the JavaScript function avgGrades?

What basis code is needed to define the JavaScript function avgGrades?
A . Function avgGrades () {}
B. avgGrades function ()
C. avgGrades (){ }
D. var = function avgGrades () {}

Answer: A

Explanation:

So, option A is the correct answer. This declares a function named avgGrades. The parentheses () are used to optionally pass parameters into the function, and the curly braces {} enclose the body of the function where you write the JavaScript code to be executed.

The complete function might look like this, depending on what you’re trying to achieve:

Latest 1D0-735 Practice Questions with 55 Q&As

Updated Study Material | Instant Download | Detailed Answers and Explanations

Subscribe
Notify of
guest
0 Comments