Question:What is the output of following JavaScript code?
<script type="text/javascript">

function sum(x){
   function add(y){
     return x+y;
   }
   return add;
}

function callme(){
  result=sum(5)(5);
  alert(result);
}

callme();

</script>
 

A 10 

B 5 

C error 

D none 

+ Answer
+ Report
Total Preview: 971

Copyright © 2025. Powered by Intellect Software Ltd