node --inspect index.js
Last active
November 2, 2018 09:55
-
-
Save sota1235/89c4ba346c6274828cc8e5c21f15cb59 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const expArr = require('./test.js'); | |
const INTERVAL_MSEC = 1000; | |
const print = () => { | |
console.log(expArr.length); | |
}; | |
const printInterval = () => { | |
setTimeout(() => { | |
print(); | |
setTimeout(printInterval, INTERVAL_MSEC); | |
}, INTERVAL_MSEC); | |
}; | |
printInterval(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function create() { | |
console.log('create array'); | |
const arr = []; | |
for (let i = 0; i < 100000; i++) { | |
arr.push('hogeeeeeee'); | |
} | |
return arr; | |
} | |
const expArr = create(); | |
module.exports = expArr; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment