1.

Which keyword is used to define the function in javascript?(a) void(b) int(c) function(d) mainI got this question during an internship interview.This key question is from Defining and Invoking Functions topic in chapter Lexical Structures of JavaScript

Answer»

Right option is (c) function

To explain: 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).



Discussion

No Comment Found

Related InterviewSolutions