Replying to Avatar Lamp

nostr:npub1x3azxuysp5vmfer4vgs4jn5tmfcx4ew8sh0qnev7gczljxsr7jwqa3g4el switch itself isn't a block?

well, i changed it to var.

Still a block. But doing without bracket is quite similar to this:

```

switch {

let a = 1;

let a = 2; // the error arrives here

case "1":

// ....

}

```

Does not matter if you use let, var, or const tho.

Reply to this note

Please Login to reply.

Discussion

This is basically how JavaScript object works. This is common.

Yeah. Now you know.