Skip to content

Instantly share code, notes, and snippets.

@doug-numetric
Created December 17, 2018 18:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save doug-numetric/83914f30a351f02b4df64e9223db64b1 to your computer and use it in GitHub Desktop.
Save doug-numetric/83914f30a351f02b4df64e9223db64b1 to your computer and use it in GitHub Desktop.
lab.js
const fetch = require('node-fetch');
const url = 'https://www.random.org/decimal-fractions/?num=1&dec=10&col=1&format=plain&rnd=new';
fetch(url).then(response => response.text())
.then(textNumber => {
console.log(textNumber);
});
// write implementation fo threeRandomNumbers here
(async () => {
for await (const number of threeRandomNumbers()) {
console.log(number);
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment