logoalt Hacker News

kbolinolast Tuesday at 6:23 PM1 replyview on HN

It's trickier than that, unfortunately. There has to be at least one new variable on the left side of := but any other variables that already exist in the same scope will simply be assigned to. However, if you use := in a nested block, then the variable is redeclared and shadows the outer-scope variable.


Replies

Pxtllast Tuesday at 7:01 PM

Thanks, I hate it.

show 2 replies