Skip to content

Instantly share code, notes, and snippets.

View devcybiko's full-sized avatar

Greg Smith devcybiko

View GitHub Profile
@devcybiko
devcybiko / asyncExample.js
Last active July 9, 2021 02:49
demonstration of how async/await is still asynchronous
const { access } = require('fs').promises;
const { constants } = require('fs');
const readline = require('readline');
const prompt = require('prompt-sync')();
let count = 10;
async function timer$(s) {
console.log(s + " " + count);
count--;
if (count) setTimeout(timer$, 1000, s);