1.

The function stops its execution when it encounters?(a) continue statement(b) break statement(c) goto statement(d) return statementI had been asked this question in a job interview.This is a very interesting question from Defining and Invoking Functions topic in chapter Lexical Structures of JavaScript

Answer»

The correct choice is (d) return statement

Easiest 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.



Discussion

No Comment Found

Related InterviewSolutions