Given a class definition as below, I am getting RangeError: Maximum call stack size exceeded when trying to see which properties the Object has.
var Person = (function () {
function Person(name, age) {
this.name = name;
this.age = age;
}
Person.prototype.inspect = function () {
console.log(this);
};
return Person;
})();
var radek = new Person("Radek", 28);
radek.inspect();
In browser (Chrome), we will get the following though:
Person {name: "Radek", age: 28, inspect: function}