Language: js Code: const buttons = [ { "x": 50000, "y": 49996, "bid": 8, "btext": "first" }, { "x": 50000, ...
const xs = [ ...new Set(buttons.map(b => b.x)) ].sort(); const groups = []; for (const button of buttons) { const i = xs.indexOf(button.x); groups[i] = groups[i] ?? []; ...
does it make sense to have addEventListener and immediately after removeEventListener? Or should I put removeEventListener only in functions which remove elements with events ...
Is it because button click is delayed while dummy() is executed immediately after getData()?
And what do you want your output to be?
Do you mean minifier?
Is there no css compiler? 😑 So many reinventing the wheel but I can't find a way to de-dupe and minify css
hi. Has anyone played card games with React?
So let's say I want to sort a bunch of objects received with fetch on a click event. Since fetch is async, it'll return a promise. So if I want to sort it on click, I'll need ...
alternating players on the same client What does that mean? I want for one player to initialise a session, then share a link like tic-tac-toe.com/yayadasad1412ff, another pl...
is there a clean way to modify Date object instances but without mutations? no third-party libs e.g. setFullyear but it returns a new instance with the changed year
(typescript) console.log(item.uploader) console.log(userID) This gives 123456n and 123456. Both are actually number what is the n at end of the number? It's pretty hard to g...
WARNING: Node.js 10 is no longer supported by the Node.js Foundation as of April 2021. We recommend you to upgrade to the latest version of Node.js runtime as soon as possible...
What do you think the problem is and how to "fix" it given the warning you just sent us?
viduna .lk site is protected by CloudFlare & aws firewall. using chrome browser open viduna,.lk site after it redirect to like this picture captcha page(it redirect reason is ...
interface Oof { yikes_enabled: boolean yikes_string: string | undefined } I'm sure that if yikes_enabled === true then yikes_string won't be undefined Can I somehow make ...
What would be the current hype backend framework? I don’t mean for static site generation or whatever, just for writing APIs
Here's a working example where Typescript is perfectly happy about the types, no any or unknown, yet is still wrong about the type of fly: https://www.typescriptlang.org/play?...
You, a singular inexperienced JS dev, are trying to break captchas. Captchas are made by international multibillion corporations who have spent countless years and money to st...