Question
Which of the following is/are the right way to declare a method?(i) function functionName() { function body }(ii) scope function functionName() { function body }(iii) method methodName() { method body }(iv) scope method methodName() { method body }
Answer: Option C
Was this answer helpful ?
In case of public methods, you can forgo explicitly declaring the scope and just declare the method like you would a function.
Was this answer helpful ?
Submit Solution