var theThing = null;
var replaceThing = function() {
  var originalThing = theThing
  var unused = function() {
    if (originalThing)
      console.log("hi")
  }

  theThing = {
    ongStr: new Array(1000000).join('*'),
    someMethod: function() {
      console.log(someMessage)
    }
  };
};
setInterval(replaceThing, 1000);

相关文章:

  • 2022-12-23
  • 2021-07-04
  • 2022-12-23
  • 2022-01-02
  • 2022-12-23
  • 2022-12-23
  • 2022-01-16
  • 2021-08-16
猜你喜欢
  • 2021-04-04
  • 2021-10-22
  • 2022-01-02
  • 2021-11-30
  • 2021-06-12
相关资源
相似解决方案