Skip to content

Instantly share code, notes, and snippets.

@nfroidure
Created October 18, 2021 11:42
Show Gist options
  • Save nfroidure/523d7840ab2cd6671884c45fdff0c1b9 to your computer and use it in GitHub Desktop.
Save nfroidure/523d7840ab2cd6671884c45fdff0c1b9 to your computer and use it in GitHub Desktop.
// Programme qui compte jusque l'infini
// Par Thomas et Nicolas Froidure Stiernon
const depart = Date.now();
let compteur = 0;
while(true) {
if(Math.floor(Math.log10(compteur + 1)) > Math.floor(Math.log10(compteur))) {
console.log(compteur + 1, Math.round((Date.now() - depart) / 60000));
}
compteur = compteur + 1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment