Now, to think about the other options, let's assume the variable in the loop was `const` instead of `let`:
```
let vals = [];
const makeArr = v => [() => v, () => v];
for (const x of makeArr(() => x)) vals.push(x);
```
What constant value would vals[0]()() and vals[1]()() see?
11.03.2026 16:59
π 1
π 0
π¬ 0
π 0
Some hints:
`let x; for (let x of ...expr...)...` follows similar shadowing rules as `let x; { let x = ...expr... }`
This excludes one of the options.
11.03.2026 16:50
π 1
π 0
π¬ 1
π 0
ECMAScript EXTRA-SPECIAL excitement π
π¨π¨π¨ IT'S ABOUT TIME! π¨π¨π¨
Congrats to @ptomato.name on advancing Temporal to Stage 4 at @tc39.es today π
Temporal is the replacement for the JavaScript Date API π
11.03.2026 15:26
π 94
π 27
π¬ 7
π 7
Exciting things happening in TC39 right now
11.03.2026 15:17
π 21
π 2
π¬ 0
π 1
What data would you store on atproto?
11.03.2026 14:09
π 0
π 0
π¬ 1
π 0
You compute total spend and receive per person (they already do that), and subtract the two numbers
11.03.2026 12:49
π 2
π 0
π¬ 1
π 0
π
11.03.2026 12:41
π 2
π 0
π¬ 1
π 0
Well I know for sure that the full amount for @patak.cat is getting out of my bank account!
11.03.2026 12:36
π 2
π 0
π¬ 1
π 0
I wonder whether any of those is correct
11.03.2026 12:24
π 5
π 0
π¬ 1
π 0
Is your expected answer the same you would get if you delete the first line, or the other one?
11.03.2026 12:23
π 0
π 0
π¬ 1
π 0
Apparently I sponsor @patak.cat on GitHub, @patak.cat sponsors @danielroe.dev, and @danielroe.dev sponsors both @patak.cat and me.
I feel like there is an optimization opportunity here π€
11.03.2026 12:06
π 79
π 5
π¬ 11
π 0
Ah yes, the for-of combinator
11.03.2026 11:52
π 7
π 0
π¬ 0
π 0
let x = () => x;
for (let x of [() => x]) {
console.log(x === x());
}
JavaScript quiz: what is the output of this code?
(code in the alt text for copy&pasting)
11.03.2026 11:10
π 23
π 1
π¬ 10
π 0
Emptying the Nutella jar and then putting it back in the cabinet making me believe I can have some must be a crime.
10.03.2026 17:05
π 10
π 0
π¬ 0
π 0
Bloomberg JS Blog
The official Bloomberg JavaScript blog - insights, tutorials, and best practices from Bloomberg's JavaScript engineering team.
Some time ago, @jonkuperman.com & @tchetwin.bsky.social had a dream for the JS engineers at Bloomberg to be more public about the cool JS work we have going on.
That dream has come true - now we have a blog platform π
(You'll see more articles over the next few days)
bloomberg.github.io/js-blog/
09.03.2026 19:08
π 70
π 14
π¬ 4
π 0
You are saying that you will absolutely need this in 6 weeks to deal with all baby-related tasks, so better start working on it soon?
06.03.2026 12:33
π 2
π 0
π¬ 1
π 0
π this looks nice!
06.03.2026 12:32
π 3
π 0
π¬ 0
π 0
Ohhhhhhh π
06.03.2026 11:41
π 0
π 0
π¬ 0
π 0
Step 1. Get hired by Discord
Step 2. Implement background updates for their desktop app rather than forcing me to update when I want to open it
Step 3. Quit Discord
06.03.2026 10:28
π 89
π 6
π¬ 3
π 1
Wow so many typos
06.03.2026 08:33
π 2
π 0
π¬ 0
π 0
Give the use case it'd be cool to make hardware for it, like an e-ink display that you can hang in the living room for people to check what's to be done. It needs to work well I'm grayscale.
06.03.2026 08:32
π 7
π 0
π¬ 3
π 0
"It's one side project, Michael. How much time could it require, 10 hours per day?"
06.03.2026 08:31
π 7
π 0
π¬ 1
π 0
Oh, is our 10am call still happening? I have tea to spill.
06.03.2026 08:19
π 2
π 0
π¬ 1
π 0
Reinstalling the Nvidia drivers from recovery mode fixed it
06.03.2026 00:12
π 2
π 0
π¬ 0
π 0
It was not a good sign
06.03.2026 00:08
π 2
π 0
π¬ 1
π 0
The screen has been black for the last 3 minutes after asking to reboot, is it a good sign?
05.03.2026 23:33
π 3
π 0
π¬ 1
π 0
Updating my Ubuntu version feels scarier than migrating across PDSes.
05.03.2026 23:32
π 10
π 0
π¬ 3
π 0
Atproto Amsterdam happened!
We solved private data AND payments, and also digital credentials trust chains and also moderation and games too.
Wait, no we just had a great three hours of chatting about atproto (mostly).
Thanks @internetarchive.eu for hosting us!
05.03.2026 20:56
π 93
π 8
π¬ 4
π 2
Oh yes that's what I was thinking
05.03.2026 11:56
π 2
π 0
π¬ 0
π 0