Multiple choice

Which of the following statements is correct for a method in Java Script? a) Function is written at the end of script. b) Format of function is a descriptive text followed by open and closed brackets. c) It is the syntax to find an error. d) Function does everything, before it is called.

  1. Only (a)

  2. Only (b)

  3. Only (c)

  4. Only (d)

  5. None of these

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

It is correct, and follows the right syntax for a function, for example, function message( ).