Skip to main content
InterviewHubPRO
Section Overview
Q230

Question 230 of 536

Part 4: Prototypes, Object Methods & Event Loop (174 - 253)

43%
JavaScript & V8 Internals (536 Qs)•Part 4: Prototypes, Object Methods & Event Loop (174 - 253)

What are the function parameter rules

junior LevelMost AskedCode ExampleEvent LoopPrototypes

JavaScript functions follow below rules for parameters,

  1. The function definitions do not specify data types for parameters.
  2. Do not perform type checking on the passed arguments.
  3. Do not check the number of arguments received. i.e, The below function follows the above rules,
javascript
  function functionName(parameter1, parameter2, parameter3) {
    console.log(parameter1); // 1
  }
  functionName(1);