Q. What will be the output of the following code snippet?

Code:
(function(a){
 return (function(){
   console.log(a);
   a = 6;
 })()
})(21);
  • (A) 6
  • (B) NaN
  • (C) 21
  • (D) None of the above
πŸ’¬ Discuss
βœ… Correct Answer: (C) 21

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
324
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Admin
Publisher
πŸ“ˆ
91%
Success Rate