Skip to content

Instantly share code, notes, and snippets.

@AbeEstrada
Created April 14, 2022 14: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 AbeEstrada/d5b44a01845fd040b980ee102463ff20 to your computer and use it in GitHub Desktop.
Save AbeEstrada/d5b44a01845fd040b980ee102463ff20 to your computer and use it in GitHub Desktop.
console.log(JSON.stringify(data ?? null, null, 2))
[...Array(10).keys()]
const sleep = ms => new Promise(res => setTimeout(res, ms));
const sum = arr => arr.reduce((sum, n) => sum + n, 0)
const avg = arr => sum(arr) / arr.length
const random = (min, max) => Math.random() * (max - min) + min
const randomInt = (min, max) => Math.round(random(min, max))
const fibonacci = n => n > 0 ? n * fibonacci(n - 1) : 1;
const elements = ['a', 'b'];
for (const [i, el] of elements.entries()) { console.log(i, el) }
onInput={({ currentTarget: { value } }) => {}}
@AbeEstrada
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment