In JavaScript, the following function may return
either a Numeric value or a String simply
based on the type of data passed to it as parameters.
function f(a,b) { return a + b };
a.) True
b.) False
Hopefully all yours doubt will clear if you have left with any doubt please let me know in comment. I will try my best to resolve that.
Answer :-
Correct option is A which is True.
JavaScript is a dynamic language. So it's variables are dynamic type which means type of variable is decided at run time according to their value.
As shown in below screenshot :-
In first screenshot a and b are integer so we get integer value returned by function. Which is addition of integer a and integer b.
In second screenshot a and b are string so we get string value returned by function. Which is concatenation of string a and string b .
First screenshot :-

Second screenshot :-

In JavaScript, the following function may return either a Numeric value or a String simply based...