28 comments
@lily arrays and objects do this in js yes. what const means is you cannot change it with the = statement. you can push to an array, pop elements off, you can access properties of objects and methods on them and change all of them- but you cant go and do @h @lily yeah the indices are all treated as strings (but optimised internally). by the spec arrays are "exotic objects", which means their impl can do weird things ( also fun fact most array methods dont actually require an array, so you can do @h@social.besties.house this is also a nice way to end up with an array containing @h wait why is this bad ? :neofox_googly_shocked: I was poleaxed the first time I saw the !!! javascript operator, and then researched it and learned it's actually useful in context. Fuck ECMA-script. Second worst thing in the software world, after Windows. @artemesia idk what youre talking about with triple exclamation? thats just the same as one- The first two !! do a type conversion to binary. The third inverts the binary value. The combination lets you do a C-style conditional of "not that, whatever it is". I wish I didn't know this, and I wish javascruff wasn't such a shitty language. @artemesia before wasm engines had things like this to make javascript run faster by being able to make much more drastic optimisations @artemesia you try it??? it does the same thing as one exclamation point as far as a dev is concerned? |
@h what if you increase it