Consider the following code in TypeScript. What is the result when the function sum() is called with two string arguments?
function sum(a: number, b: number): number;
function sum(a: string, b: string): string;
function sum(a: any, b: any): any {
return a + b;
}
console.log(sum("Hello", "World"));
HelloWorld
NaN
"Hello World"
undefined
This question is part of this quiz :
TypeScript Functions Quiz