| |
|
What will be the output of the following snippet , if we pass 3e,5? Question Posted on 16 Jan 2021 Home >> Angular >> AngularJS Packaging and Testing >> What will be the output of the following snippet , if we pass 3e,5? |
What will be the output of the following snippet , if we pass 3e,5?
Choose the correct option from below list
vm.add = function(a,b){
if(typeof a !== 'number' || typeof b !== 'number'){
return 'invalid args';
}
return a+b;
}
(1)logical error
(2)compile time error
(3)invalid args
(4)runtime error
Answer:-(3)invalid args | |
|
|
|
|