Consider following code:
 
function a() { 
   return("works"); 
} 
   var b = a("AAA"); 
   alert(b);
 
What message will be displayed in alert box?
Explanation

return("works") // works

return("works"+a) // worksfunction a() { return("works"+a); }

Thanks, @iamdimita! Fixed)

2016 Jun 15, 5:26:58 PM

function a() { return("works"+a); } var b = a("AAA"); console.log(b); Does not return "worksAAA", like you say: return("works"+a) // вернет worksAAA

2016 May 5, 3:04:31 AM

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback