Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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

AbeEstrada commented Apr 14, 2022

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