A function with no return value is called………
a) Procedures
b) Method
c) Static function
d) Dynamic function
Explanation: Void functions does not return a value. Functions with no return value are sometimes called procedures.
The function stops its execution when it encounters?
a) continue statement
b) break statement
c) goto statement
d) return statement
Explanation: Continue statement and break statement are used in the loops for skipping the iteration or going out of the loop. Whenever a return statement is encountered the function execution is stopped.
Which keyword is used to define the function in javascript?
a) void
b) int
c) function
d) main
Explanation: A JavaScript function is defined with the function keyword, followed by a name, followed by parentheses(). Function names can contain letters, digits, underscores, and dollar signs (same rules as variables).
Which is an equivalent code to invoke a function m of class o that expects two arguments x and y?
a) o(x,y);
b) o.m(x) && o.m(y);
c) m(x,y);
d) o.m(x,y);
Explanation: The two argument in a function are separated by a comma (,). The code above is an invocation expression: it includes a function expression o.m and two argument expressions, x and y.