Create a function that exhibits the same behaviour as of “new” (constructor) keyword in javascript

后端 未结 0 1814
南旧
南旧 2021-02-10 13:38

Given:

const obj = new SampleClass(param1);
console.log(obj.passedParam1); // displays the value of passed parameter


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题