Created
April 14, 2022 14:26
-
-
Save AbeEstrada/d5b44a01845fd040b980ee102463ff20 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 } }) => {}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://twitter.com/n_moore/status/1514270357594775554