MCQs>IT & Programming>JavaScript>Consider the following code: var bar = (function(){ function Bar(){}; return new Bar(); })(); How will you make another instance of Bar?
JavaScript MCQs
Consider the following code: var bar = (function(){ function Bar(){}; return new Bar(); })(); How will you make another instance of Bar?
Answer
Correct Answer: new bar.constructor()
Explanation:
Note: This Question is unanswered, help us to find answer for this one