Challenger App

No.1 PSC Learning App

1M+ Downloads
How do you define a function in JavaScript ?

Avoid name(){}

Bfunction name () { }

Cdef name() { }

Dvar=name() {}

Answer:

B. function name () { }

Read Explanation:

  • A function in JavaScript is similar to a procedure —a set of statements that performs a task or calculates a value.
  • But for a procedure to qualify as a function, it should take some input and return an output where there is some obvious relationship between the input and the output.
  • 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).
  • The parentheses may include parameter names separated by commas: (parameter1, parameter2, ...)

Related Questions:

What is the value of sum after the execution of the following code?

int sum = 0;

for (int i = -5; i<=;i++)

{

         if (!i) break;

         sum += i;

}

 

 

കോബോൾ പ്രോഗ്രാമിങ് ലാംഗ്വേജുമായി ബന്ധപ്പെട്ട് ശരിയായ പ്രസ്താവനകൾ ഏതൊക്കെയാണ് ?

  1. ' Common Business Oriented Language ' എന്നതിന്റെ ചുരുക്കപ്പേരാണ് കോബോൾ
  2. 1950 കളിൽ ഗ്രേസ് ഹോപ്പർ എന്ന അമേരിക്കൻ കമ്പ്യൂട്ടർ ശാസ്ത്രജ്ഞനാണ് COBOL വികസിപ്പിച്ചത് 
  3. ബാങ്കിംഗ്, ഇൻഷുറൻസ് മേഖലകളിൽ വ്യാപകമായി ഉപയോഗിച്ചിരുന്ന കമ്പ്യൂട്ടർ ഭാഷയാണ് ഇത് 
  4. ആധുനിക ഉപകരണങ്ങൾ COBOL ഫോർമാറ്റ്  അംഗീകരിക്കില്ല അതുകൊണ്ട് ഇപ്പോൾ COBOL നെ ഒരു ലെഗസി ലാംഗ്വേജ് ആയി പരിഗണിക്കുന്നു 
Find the user defined data type in C :
Herder node is used as sentinel in :
The first step in a query processing is :