in JavaScript by
Q:
Which one of the given options can be considered as the correct output of the following code?

var addition=newFunction("number1","number2","return number1+number2");  

document.writeln(addition(10,5));  

a) 12

b) 13

c) 15

d) Error

► Click here to show 1 Answer

0 votes
by

Answer: C

Reason: The "addition()" function was defined in the first line of code using the "new" property. In the second line of code, the addition function is called along with two passed arguments as 10, 5 inside the "document.write()" method, which prints the sum of two passed arguments returned by the "addition()" method.

JavaScript
Learn More with Madanswer
...