Sail E0 Webinar
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 }
Options:
A .  Only (ii)
B .  Only (iv)
C .  (i) and (ii)
D .  (iii) and (iv)
Answer: Option C


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 ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers