Skip to content

Instantly share code, notes, and snippets.

@szaranger
Created August 16, 2022 23:57
Show Gist options
  • Save szaranger/9b55f613a5b4aea8998d351d9da77a72 to your computer and use it in GitHub Desktop.
Save szaranger/9b55f613a5b4aea8998d351d9da77a72 to your computer and use it in GitHub Desktop.
let original = null;
const duplicate = function () {
const isOriginal = original;
const unused = function () {
if (isOriginal) {
console.log("I'm unused");
}
};
original = {
id: Array(100000).fill("*"),
sayHello: function (name) {
console.log(name);
},
};
};
setInterval(duplicate, 1000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment