10000 forum users celebration - special event

I was going to ask how is -1 a key name and i noticed instead of {}, congrats we make impossible possible.

xd!

Numbers can be a key name, tho…

\> {-1:"bruh"}
< Uncaught SyntaxError: Unexpected token ':'

I don’t think so :confused:

{}[-1] = "bruh"

Uncaught SyntaxError: Invalid destructuring assignment target

Wait, it’s possible!

IK how to do this

const arr = new Array(0);
arr[-1] = "FOO";
console.log(arr);
let obj = {};
obj[-1] = "foo";

Srry, my bad.

Makes sense lmao.

Interesting…

How about -100?

works!

FR?!!

const array = [];
array["foo"] = "bar";

WORKS?!!

This would be a good question for SO.

I’m [question] banned tho :sob:

Actually although it is being placed inside , but the type of it is an object (same with {})

Yeah, IK that.

Now I know why they say it’s an object lol.

1 Like

Fixed :slight_smile:

B r u h

In the C community, undefined behavior may be humorously referred to as "nasal demons "

ā€œNasal demonsā€ XD

1 Like

im surprised i have my regular role still

My dad literally just said: ā€œI want to hold back information from you, so I block websites to keep you from learning informationā€.

As in, news and other things.

My dad wants to be like China and limit the press :confused:

1 Like

How much do you have to do to keep your regular?

This topic serves to help staff to make a psychological assessment of forum users and is used for various psychiatric tests.

5 Likes

50% of 100 days

50% of what?

1 Like