I have a serious problem about a method. So this is my method :
Object.prototype.clonage = function() {
  var newObj = (this instanceof Array) ? [] : {};
  for (i in this) {
    if (i == 'clone') continue;
    if (this[i] && typeof this[i] == "object") {
      newObj[i] = this[i].clonage();
    } else newObj[i] = this[i]
  } return newObj;
}
And the browser is giving me:
Uncaught RangeError: Maximum call stack size exceeded
At the line:
for (i in this) {
Can someone has the same problem?
 
     
     
    