github.com/igggame/nebulas-go@v2.1.0+incompatible/nf/nvm/test/test_stack_overflow.js (about)

     1  function Set() {
     2      this.values = {}
     3      this.length = 0
     4  }
     5  
     6  Set.prototype.get = function () {
     7      return this//支持链式调用
     8  }
     9  
    10  Set.prototype.toString = function () {
    11      ret = this.get() + "test"
    12      return ret
    13  }
    14  
    15  var Test = function () {
    16  };
    17  
    18  Test.prototype = {
    19      init: function () {
    20         var s = new Set();
    21         s.toString()
    22      }
    23  };
    24  
    25  module.exports = Test;