diff --git a/printFollowerCount.js b/printFollowerCount.js new file mode 100644 index 0000000..42bf3f7 --- /dev/null +++ b/printFollowerCount.js @@ -0,0 +1,27 @@ +// i85zmo3j i85zmo3j + +let followerClass = prompt('Enter the class for followers') +console.log(followerClass) + +function getfollowers() { + return document.querySelectorAll(`.${followerClass}`).length +} +function scrollAndGetFollowers() { + window.scrollTo(0, document.body.scrollHeight); + return getfollowers(); +} + +// setTimeout(() => { scrollAndGetFollowers() }, 2000); + +let continuePrinting = true; + +document.addEventListener('keydown', function(e) { + if (e.key=="s") { + continuePrinting = false; + } +}) + + +setInterval(() => { + console.log(`This user has ${scrollAndGetFollowers()} followers!`) + }, 10000); \ No newline at end of file