MCQ Single Best Answer Easy

QWhat is the result of the following function call in JavaScript?
add(10, 5);

function add(x, y) {
return x + y;
}

ID: #4915 Javascript Functions MCQ 261 views
Question Info
#4915Q ID
EasyDifficulty
Javascript Functions MCQTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A 15
  • B '105'
  • C undefined
  • D TypeError
Correct Answer: Option A

Explanation

In this case, the add function is defined before it is called, so the function call is successful and returns the sum of the two numbers, 15.

Share This Question

Challenge a friend or share with your study group.