Perry Lorier on Nostr: x = { 1: 2 } console.log(x) x[3] = 4 Expected output: { 1: 2 } Actual output: { 1: 2, ...
x = { 1: 2 }
console.log(x)
x[3] = 4
Expected output:
{ 1: 2 }
Actual output:
{ 1: 2, 3: 4 }
If I wanted the value of the variable at some other point in the program I would have logged it then! Most frustrating when you're generating a list of things then consuming them. While debugging it appears your program has no items for the entire length of the program. Gggnneeneeerrfgg!
console.log(x)
x[3] = 4
Expected output:
{ 1: 2 }
Actual output:
{ 1: 2, 3: 4 }
If I wanted the value of the variable at some other point in the program I would have logged it then! Most frustrating when you're generating a list of things then consuming them. While debugging it appears your program has no items for the entire length of the program. Gggnneeneeerrfgg!