Guess Output of following code
Code:
function sumNumber(a,b){
"use strict"
a=30;
b=50;
return arguments[0] + arguments[1];
}
let sum = sumNumber(10,20);
console.log(`sum=${sum}`)
Output:
sum=30
Explanation:
if we add use strict them we can't override value of
function parameter inside function.
No comments:
Post a Comment