1.

When a program contains extensive use of event handlers, which of the following is necessary?(a) Modular functions(b) Nested functions(c) Split up programs(d) Global variablesThis question was posed to me during an interview for a job.This interesting question is from JavaScript in Web Browsers topic in chapter Server-Side and Client-Side Scripting of JavaScript

Answer»

The correct option is (b) Nested FUNCTIONS

The EXPLANATION is: Nested functions are those functions in which one function is defined INSIDE ANOTHER function. Nested functions are common in client-side JavaScript, because of its extensive use of event HANDLERS.



Discussion

No Comment Found

Related InterviewSolutions