5
आप समझा सकते हैं साथ सेटर कारण है कि मैं इस उदाहरण मेंफील्ड, गेटर और एक ही नाम
Uncaught RangeError: Maximum call stack size exceeded
मिलता है। कार्यों का अनुक्रम क्या है?
"use strict";
let myClass = class myClass{
constructor(name){
this.name = name;
}
get name() { return this.name; }
set name(name){ this.name = name; }
}
let myObj = new myClass("John");
मुझे यह मिला, मदद के लिए धन्यवाद –