1.

The function definitions in JavaScript begins with _____________(a) Identifier and Parentheses(b) Return type and Identifier(c) Return type, Function keyword, Identifier and Parentheses(d) Identifier and Return typeThis question was addressed to me during an interview.The doubt is from Defining and Invoking Functions topic in section Lexical Structures of JavaScript

Answer»

Correct ANSWER is (c) RETURN type, Function keyword, Identifier and Parentheses

The explanation: The function definitions begin with the keyword function FOLLOWED by an identifier that names the function and a pair of parentheses around a comma-separated LIST of zero or more identifiers.



Discussion

No Comment Found

Related InterviewSolutions