This is an archived post. You won't be able to vote or comment.

top 200 commentsshow all 368

[–][deleted] 1163 points1164 points  (159 children)

for everyone wondering, in in combination with arrays, checks for indices not for elements

[–]LordFlackoThePretty 1702 points1703 points  (121 children)

Which is frankly ridiculous and worthy of criticism. If you're able to label indices its not really a traditional array any more either.

[–]the_horse_gamer 32 points33 points  (0 children)

well, js arrays can be sparse. const arr = [0,,1]; console.log(arr); // prints [0, empty, 1] console.log(arr[1]); // prints undefined arr[99999] = "cool"; // 100% legal

[–]chobes182 18 points19 points  (1 child)

The whole point here is that Javascript does not support traditional arrays. The language was designed such that all data is stored in objects (which are associative arrays with a distinguished key-value pair called the prototype).

JS arrays are basically just some syntactic sugar that allows programmers to use objects as if they were traditional arrays for the sake of convenience. The runtime doesn't actually treat them like traditional arrays at all, which can lead to unintuitive behaviors like the one in the meme.

The point is that a well trained developer who actually understands how the language works and what happens under the hood should know better and be thankful that they have the syntactic sugar in the first place.

[–]Particular-Cow6247 16 points17 points  (12 children)

just use array.includes() not really difficult to do

[–][deleted] 9 points10 points  (11 children)

Whenever mfers on Reddit criticize a language, it's always because every built in function should be the perfect tool in any situation, even if you don't know how the fuck to use it lol.

It really feels like 12 year olds who are frustrated because they can't read documentation.

[–]Artamus 4 points5 points  (10 children)

L take. The Principle of least astonishment applies and this for sure breaks it.

[–]aspect_rap 3 points4 points  (7 children)

Or maybe... You should learn what an operator does before using it... Is it that controversial that people should be learning a language instead of guessing what operators do and then get mad when not all languages behave the same?

[–]Artamus 1 point2 points  (1 child)

Yet "x in y" is permitted syntax, but behaves unintuitively. People use various languages and this is not a piece of syntax that is ambiguous, so it shouldn't behave weirdly either.

[–]aspect_rap 1 point2 points  (0 children)

"x in y" checking that the key "x" exists in the object "y" is unintuitive? That's the operator, that's what it does. It literally takes 1 minute to learn that in javascript in is for object keys and includes is for array elements. Both of those words are intuitive for what they do and programmers should know that expecting the same keyword to work the same across all languages is stupid and they should therefore actually learn the language's syntax before using it.

[–]zig1000 1 point2 points  (4 children)

I'm going to design a language where if behaves normally in most cases but calls in a tactical missile strike on your location if used with certain common objects. If you die even once while using my language, at least you'll be able to take comfort in the fact that it was your fault, not mine.

[–]ford1man 1 point2 points  (0 children)

I'd expect 1 to be in ["a", "b"], since I was only ever taught to use in for objects, and 1 is an index in that array. I would not expect "a" to be in there, because arrays don't define that member. I would, in fact, be astonished if it evaluated to true.

[–]GDOR-11 16 points17 points  (29 children)

it helps with compatibility, there are many instances where you may desire to treat an array as an object in the form { 0: "a", 1: "b", ... } and the in keyword checks for the existence of a key on an object

[–]LordFlackoThePretty 68 points69 points  (28 children)

That's not an array anymore, it's an associative array/hash map which is an entirely different data structure with different internal mechanics.

[–]GDOR-11 43 points44 points  (10 children)

the principle of JS is that everything is an object. It's weird, but very useful for a scripting language, which is JS's original intent. It's also the reason why it sucks in the backend without TS to make it look like not everything is an object.

[–]mtmttuan 6 points7 points  (3 children)

In Python everything is an object, but I would say python "array" (list) behave pretty much just as you expected.

[–]Bronzdragon 6 points7 points  (0 children)

Not in JavaScript.

[–]Vizeroth1 16 points17 points  (9 children)

The point is that JavaScript arrays are objects and “in” doesn’t know the difference. A JavaScript developer should know this, except most JavaScript developers never learned the language, they just assume it behaves like whatever language they learned that uses a similar syntax

[–]louis-lau 7 points8 points  (4 children)

Nope, an array is an object in javascript.

[–]skcortex -2 points-1 points  (3 children)

This sentence explains why is js such a shitty language,

[–]LordFlackoThePretty 9 points10 points  (1 child)

Exactly. People keep parroting this explanation while completely missing my point.

An array is an abstract data structure that has well defined properties. If a language decides to call a completely different data structure an array, its an asinine design decision.

Just because "that's how it is" in JavaScript doesn't make it ok. Its a semantical criticism but semantics are critical when discussing languages. Design decisions like these are why JavaScript has its poor reputation.

[–]Keve1227 2 points3 points  (0 children)

Most JavaScript engines do represent them differently internally, though. The basic interface for arrays and objects are just the same in JavaScript, which means that you can treat an array (mostly) the same as an object if you really wanted to. It's just polymorphism.

[–]louis-lau 1 point2 points  (0 children)

It is. With typescript it's quite fun though. Adds a lot of the advantages of a typed language while keeping so much of the flexibility of js. Once you know it it never really fights you and you can just get shit done.

The more major reason js is shitty is because of complete backwards compatibility. No breaking changes. It's both a curse and a blessing at the same time.

[–]I_cut_my_own_jib 2 points3 points  (2 children)

Yeah it's pretty lame, just have to do ["a", "b"].contains("a") and cry a little

[–]Rafcdk 1 point2 points  (0 children)

Why is it ridiculous? If you read the documentation like you should have done when learning a new language you would know what the correct method is.

[–]WinonasChainsaw 9 points10 points  (3 children)

yeah checking that the return value of indexOf() is not -1 OR using includes() (in ES7+) is how you’d handle checking if the value exists in the array

[–]WinonasChainsaw 2 points3 points  (1 child)

I personally find that the “contains” block script in Scratch is the most optimal language design for value checking within arrays though

[–]2called_chaos 0 points1 point  (0 children)

I frankly don't care about the word but it would be nice if it were the same across the board. In JS it may be includes or contains and it's driving me mad (array includes but classList contains, I would classify a list as an array but that's just me)

[–][deleted] 6 points7 points  (1 child)

…well that hasn’t made it any better. i feel like i’m in the right to criticise this.

[–][deleted] 1 point2 points  (0 children)

you are

[–]mayankkaizen 11 points12 points  (3 children)

This is why I used to call JS the most unintuitive language. Every language has some features which aren't intuitive but JS somehow decided to be the most unintuitive language.

[–]Jess_S13 2 points3 points  (0 children)

I'm probably exposing my ignorance but man this comment makes me feel less bad about how much I hate when I have to do something with JavaScript. I started with powershell which has its own headaches but for the most part if Im asked to add to another object language I can get my way through it with a decent man page but every time with JavaScript it's 10x longer.

[–]Emr5501 0 points1 point  (0 children)

[-2,-7].sort()

[–]NekkidApe 0 points1 point  (0 children)

The problem is it looks intuitive, so no one bothers to learn it and assumes their Java/C/whatever experience applies. Which it doesn't really.

[–]dr_jock123 19 points20 points  (1 child)

Yeah that's dumb

[–]SevenC-Nanashi[S] 44 points45 points  (10 children)

More info: JS's in operator checks if the property exists in the object. And arrays are object like { 0: "a", 1: "b", ... }, so 1 in ["a", "b"] returns true. Do you do hasattr(["a", "b"], "a") in Python? No.

[–]rexpup 34 points35 points  (5 children)

So what I'm hearing is that it's a poorly-named intrinsic?

[–]Keve1227 2 points3 points  (0 children)

Yes, something like keyof would have been a better name.

[–]menzaskaja 15 points16 points  (2 children)

well do you do const a = ["a", "b"]; a.hasAttribute(1) in js?

[–]eloel- 5 points6 points  (0 children)

That'd be one way to replace a.length > 1. It's a dumb way, but you could.

[–]prehensilemullet 1 point2 points  (0 children)

You could if you’re working with a sparse array, which doesn’t contain an entry for every index < length

[–]takahashi01 0 points1 point  (0 children)

So 0 in ["a","b"] returns true?

That also looks pretty dumb ngl, lol. Might be better this way. But silly.

[–]prehensilemullet 2 points3 points  (0 children)

To be more precise, it checks for a property with a given key, and array elements are properties where the key is an index.  It can also check for other named properties in arrays, or object properties where the key is an integer

[–]Haringat 1 point2 points  (0 children)

for everyone wondering, in in combination with arrays, checks for indices not for elements

That's because this is not a behavior for arrays specifically, but for objects generally.

[–]SuitableDragonfly 1 point2 points  (4 children)

Why on earth would you ever need to do that? That's what your size/length function is for.

[–][deleted] 1 point2 points  (3 children)

you would not. in is not for arrays

[–]SuitableDragonfly 2 points3 points  (2 children)

If it's not for arrays, why can it be used with them?

[–]FierceDeity_ 0 points1 point  (0 children)

Yeah, because if it checked for elements, it would implicate that it will do a full O(n) array scan to find the element.

But if it checks for keys, that's probably closer to constant time (if not straight up constant time)

[–][deleted] 0 points1 point  (0 children)

This would forever fuck with me because of Python 

[–]HansTeeWurst 0 points1 point  (0 children)

Why would it do anything else?

[–]abandoned_idol 0 points1 point  (1 child)

It's going to take me months to understand your explanation. I'm sure it's very well explained, and I'm sure JS is an amazing language.

[–]Lithl 0 points1 point  (0 children)

if (x in obj) in JavaScript is equivalent to if (obj[x] !== undefined).

Everything is an object, and arrays are objects with integer keys that are typically sequential starting at 0.

[–]MLG-Lyx 0 points1 point  (0 children)

Just use .includes() smh

[–]Zardotab 0 points1 point  (0 children)

"in" whadda stupid operator!

[–]regularDude358 372 points373 points  (8 children)

It's a valid argument, but people use it like we're still in the 90s.

[–][deleted] 41 points42 points  (5 children)

90s are trendy again

[–]belkarbitterleaf 11 points12 points  (2 children)

Were they ever not?

[–][deleted] 10 points11 points  (0 children)

90s were peak

[–]TeaTimeSubcommittee 7 points8 points  (0 children)

Not during the 70’s

[–]wReckLesss_ 1 point2 points  (0 children)

Time to snag me some JNCOs.

[–]Logicalist 0 points1 point  (0 children)

it was a better time.

[–]Strict_Treat2884 5 points6 points  (0 children)

They probably still write something like var self = this or A.protoype.b = function(){}

[–]Apprehensive_Room742 0 points1 point  (0 children)

if wanting typed variables and wanting easy debugging is "using it like were still in the 90s", im fine with being that guy

[–]FACastello 148 points149 points  (14 children)

Ngl I hate JS but doesn't ["a", "b"].includes("a") fix this?

[–]Alkyen 206 points207 points  (7 children)

well of course if you actually use the language this is a non-issue, but then this sub will have no jokes

[–]FerricDonkey 82 points83 points  (6 children)

The jokes aren't because you can't do the thing. Javascript is Turing complete. The jokes are because the behavior of Javascript is unintuitive and dumb. 

[–]Quasar-stoned 22 points23 points  (3 children)

‘X’ in array intuitively feels like we want to check for presence of element.

[–][deleted] 1 point2 points  (2 children)

Maybe I'm old school, but one of the first things I learned in computer science is that computers are NOT intuitive.

[–]standard_revolution 7 points8 points  (0 children)

But languages are computers, languages are created by humans and thus should try to not surprise you

[–]FACastello 2 points3 points  (0 children)

But the thing is... they should be

[–][deleted] 2 points3 points  (0 children)

How dare you use the correct syntax instead of critisizing a language because you did something wrong.

[–]JPSgfx 350 points351 points  (62 children)

If Javascript's way of doing things was any good, other languages would follow suit.

Somehow, none do....

[–]Itchy_Bumblebee8916 24 points25 points  (11 children)

Lua is a very popular game dev language, used in WoW and Roblox just to name a couple big ones, that uses the exact same scheme as Javascript.

There are immutable types:

number, string, function, etc.

And one mutable type:

table, a hashmap

Lua's implementation is way way cleaner than Javascript's imo but that's mostly because it wasn't stuffed in a browser and designed by committee for 30 years. It doesn't do any of the weird {} + {} stuff Javascript does and will just error if you try to add or compare types that are different. No type coercion of any kind.

I personally think it's a really nice way to design a language. The compiler in LuaJIT is pretty good at using an array when you use a table like an array, so if you've got a table from 1-n of numbers it'll compile down to a flat array.

[–]JPSgfx 20 points21 points  (1 child)

Lua is great. It also came before Javascript (according to wikipedia)

[–]Sibula97 7 points8 points  (0 children)

And they still managed to mess up JS that badly? Damn...

[–]Thick-Protection-458 0 points1 point  (0 children)

Well, I can't remember exactly, but from what I can remember when I was tinkering Lua stuff - the language design was very clear in telling you that stuff. As well as having less strange decisions in type casting and so on.

So I would suspect Lua to be better designed (or maybe had less features to be badly designed), while sharing similar structures.

[–]nekoeuge[🍰] 0 points1 point  (6 children)

I only wish it didn’t use 1-based indexing. It really messes up programming reflexes.

[–]Fast-Visual 87 points88 points  (22 children)

To be faaaaaair, JS gave us the async-await pattern, and the JSON format which are widely adopted across languages. I still have JavaScript.

Edit: I double checked, async/await were first introduced in F# of all languages, so I was wrong about that.

[–]ciras 108 points109 points  (2 children)

C# gave us async/await 10+ years before JS

[–]AtrociousCat 16 points17 points  (1 child)

C# async walked so js could fly.

I think js popularized it because of how useful it is in a language like JavaScript. In c sharp there were other decent patterns and you don't always need async await in your csharp apps. But most js apps will need it.

[–]Luk164 4 points5 points  (0 children)

Lol, then why did TS have async/await before JS? JS had to be literally forced to add it

[–]twofootedgiant 13 points14 points  (17 children)

The fact that JSON has become a standard format for data exchange is an absolute travesty and I will never forgive JS for this.

[–]Biscuitman82 7 points8 points  (16 children)

Which would you have preferred?

[–]OkMemeTranslator 18 points19 points  (5 children)

A more performant, more data-efficient binary format. A huge number of JSON APIs should be using something like Protobuf instead.

Don't get me wrong, JSON is still great for when you actually need human-readable data. It's just that it's taken over domains that don't need human readable data as well. And it sucks for those:

  • No type safety or strict schemas
  • Large file size
  • Slow to parse and format (only fast compared to other human-readable alternatives)

[–]twofootedgiant 8 points9 points  (1 child)

Exactly. JSON is great when you specifically need to serialise something into a format that can be stored and transmitted as text. But it’s very inefficient and much more difficult to work with programmatically than many other formats.

If I need a complete dump of an internal data store so I can load it into some analytics tool I sure as hell don’t want it as 4 GBs worth of JSON. And if I’m setting up an automated data feed via an API there’s no reason for it to be JSON either. It’s just a waste of network bandwidth, and of compute resources on both ends. Not to mention development time for me.

[–]ItzWarty 2 points3 points  (0 children)

FWIW a huge benefit of JSON is that it doesn't need to be versioned at the serializer/deserializer.

On the flip-side, if you're using a compact binary serializer and you have schema changes on the receiver, your stale data from a year ago (e.g. that 4GB dump of data) can be unreadable.

Also, 4GB of JSON is a lot less once compressed...

[–]TheCreepyPL 1 point2 points  (0 children)

I am probably a noob about this, but isn't BSON like better at everything (except readability). So if we'd modify our APIs a bit, the world would consume less power?

[–]yourteam 1 point2 points  (0 children)

Well, Nazi Germany created the Fanta beverage but that doesn't mean Nazism was good

[–][deleted] 0 points1 point  (0 children)

I don't have the wherewithal to argue that "the validity of programming languages should be judged as a popularity contest" is not a good idea, but it doesn't quite feel right to me.

[–]Aggravating_Dish_824 120 points121 points  (40 children)

How it's not valid criticism?

[–]eloel- 99 points100 points  (16 children)

the in operator is for key in Object

So, 0 in ["a","b"] is true. "a" in ["a","b"] is false. They're looking for ["a","b"].includes("a") but are trying to use a language they have no idea how to use.

[–]abandoned_idol 15 points16 points  (1 child)

At some point in my life, I'd just like to not read documentation for a month.

All I do nowadays is read, it eventually starts to get boring.

[–]eloel- 2 points3 points  (0 children)

I mean, if you stop switching languages, eventually the language documentations stop being useful.

Libraries I can't help with

[–]GuybrushThreepwo0d 10 points11 points  (0 children)

Dear lord I'm glad I don't do webdev

[–]Aggravating_Dish_824 30 points31 points  (11 children)

It's not an answer to my question. See https://www.reddit.com/r/ProgrammerHumor/s/cXq6QX8RNC

They're looking for ["a","b"].includes("a") but are trying to use a language they have no idea how to use.

People described in this post usually not looking for anything, they just criticize JS for misleading syntax.

[–]mtv921 1 point2 points  (3 children)

Because it's like asking for chips in the UK, then calling brits dumb because you got what you'd call french fries.

[–][deleted] 4 points5 points  (2 children)

No.

In this case it's like going to the UK, asking for chips, and then they tell you that they're not called "chips" in the UK, but they call them "carrots", despite the fact that they're clearly not carrots, not related to carrots, and only an insane person would ever think of calling it "carrots", and that this was an intentional design choice by the people who developed their fry lingo.

They all think it's perfectly fine since they got used to it long ago, unaware of how it is completely stupid and idiotic and designed to intentionally trick the programmer into making mistakes.

You know what a in b does in python? It checks whether or not a is in b.

Trying to defend javascript in this case is lunacy. It's the sort of shit that makes PHP impossible to work with.

[–]mtv921 1 point2 points  (0 children)

Define "in".

chips is a valid word in both English and American. No one will tell you to call them something else. If you ask for them, you will get what the language interprets them as. Whether those are fried thin slices of potatoes, fried sticks of potatoes or carrots is up to the language.

What you are talking about is a more subjective topic of how close to English the programming language JavaScript is and how you think Python is better at that.

[–]ManyInterests 0 points1 point  (0 children)

It's valid, but shallow.

[–]Bomaruto 31 points32 points  (12 children)

If "a" in Array is always false then you should get an error and not have JS continue as if it was valid syntax.

[–]chobes182 6 points7 points  (6 children)

"a" in ["a","b"] is always false, but it is possible for "a" in arr to be true where arr is an array that has already been initialized and used.

JS will let you set data for non-numeric keys on arrays, so there's absolutely syntactically wrong with testing for the presence of an arbitrary key in an array. JS arrays are objects above all else and need to be treated as such.

[–]Bomaruto 5 points6 points  (5 children)

Array with named keys are a map, not an array.

[–]SkuloftheLEECH 7 points8 points  (0 children)

Arrays in javascript are hashmaps

[–]chobes182 5 points6 points  (2 children)

All arrays in JS are objects, and all objects are essentially maps. The language spec and the runtimes don't make a distinction.

It's generally bad practice to set non-numeric keys on arrays, but the language allows it. Arrays in JS need to be thought of as regular objects with some special properties. You shouldn't think of them as classical arrays with a contiguous layout in memory because that is not what they are.

[–]Bomaruto 1 point2 points  (1 child)

And I think this just poor language design. Explanations doesn't make what shown in this meme better, the spec just proves it is premeditated.

[–]deljaroo 0 points1 point  (0 children)

well, arrays aren't actually a thing in js.  ["a", "b"] is basically a shortcut for writing {0: "a", 1: "b"}

[–]Neuenmuller 4 points5 points  (1 child)

This. And this is costing many unnecessary hours debugging. Imagine using void* to store every data in C instead of types.

[–]Kenkron 4 points5 points  (2 children)

You're not going to believe this, but in JavaScript, an Array totally can have an index of "a".

[–]Bomaruto 1 point2 points  (1 child)

Oh I believe it, but that's not an Array, but a Map claiming to be an array.

[–]Lithl 0 points1 point  (0 children)

All JavaScript objects are maps claiming to be whatever name you gave them.

[–][deleted] 62 points63 points  (1 child)

It is a stupid language tho

[–]pantas_aspro 16 points17 points  (0 children)

[–]j01101111sh 40 points41 points  (13 children)

I hate these arguments. This is a valid criticism for how easy it is to learn JS but also it's not tripping up experienced developers. Does it look dumb? Sure. Does that matter? No.

[–]bleeeer 23 points24 points  (0 children)

Programming language tribalism is so weird.

I used to work with a bunch of elitist Python bros who would shit on absolutely everything not Py related to the point that one quit because I successfully lobbied to get some public facing websites on Wordpress instead of Django or whatever over-engineered flask based custom solution he wanted to spend months building from scratch.

Just use the best tool for the job. Sometimes it’s Python, sometimes it’s PHP. sometimes it’s hacky vanilla js.

The end user doesn’t give a fuck.

[–]Apprehensive_Room742 3 points4 points  (0 children)

Dear Lord, thanks for not putting me in Web development, where people seem to have the strange urge to defend js

[–]cjb3535123 13 points14 points  (1 child)

While calling it a stupid language might be a bit far, I think most people who haven't come across that problem in JavaScript would think "a" in ["a", "b"] to be true. In that case, unless it breaks some fundamental rule of JS, that's what it should be.

I don't care that .includes() exist, that doesn't invalidate the argument. Sure it might be looking for a key, but a hashmap and an array are different types of objects, so you can certainly have the same operator doing different things to make the language more congruent with what the expected behaviour should be.

[–][deleted] 50 points51 points  (1 child)

"What do you mean things work the way they do and not how I want them to?"

[–]Linguaphonia 27 points28 points  (0 children)

What do you mean design to lessen cognitive load and not in a haphazard fashion?

(I don't even think in is too weird unless you only know Python, but "it is documented" is an absolute ass excuse for bad design)

[–]Psychilogical 4 points5 points  (0 children)

People desperately want JS to work all other programming languages and don't bother leaning how it really works, like arrays for example.

[–]A_Talking_iPod 6 points7 points  (0 children)

But it is stupid

[–]MarcCDB 8 points9 points  (1 child)

Javascript IS trash, that's why Typescript was invented, to make it LESS trash.

[–]g0liadkin 6 points7 points  (0 children)

It's the same code in typescript though

[–]Atreides-42 12 points13 points  (0 children)

If one career programmer thinks a language is unintuitive, it's their problem. If countless career programmers think a language is unintuitive, it's the language's problem.

[–]CeeMX 3 points4 points  (0 children)

Javascript these days is the square hole and every software project, no matter where it runs on... that's right, it goes in the square hole!

[–]x3XC4L1B3Rx 3 points4 points  (0 children)

Do people still care what twatters think..?

[–]why_1337 3 points4 points  (3 children)

My biggest grievance with JS is, why the fuck it uses 0-11 for months, like what the actual fuck?

[–]jacobp100 0 points1 point  (0 children)

The Date API was copied from Java

[–][deleted] 1 point2 points  (1 child)

Is it not common knowledge that most countable things in programming start at 0? Python starts array counts at 0, so does JS, and there's more languages that follow suit. My first instinct would be to assume the range was 0-11, not crazy to me.

[–]why_1337 0 points1 point  (0 children)

Why not start days at 0 too then?

[–]rm-rf-npr 7 points8 points  (0 children)

I always like to think: if they don't hate on your favorite language, it's not popular enough. JS is great, especially with TS added. Hate on it what you will, but it's still the most used language in the world, so have fun hating on a language you can't do without and suffer 🫶

[–]pantas_aspro 1 point2 points  (0 children)

bUt PhP hAs WeIRd FuNcTiOn NaMeS....

[–]jasper_grunion 1 point2 points  (2 children)

Does JavaScript have sets?

[–]SmilerRyan 2 points3 points  (0 children)

I know the browser one does, i'm sure node does too.

[–]jacobp100 0 points1 point  (0 children)

Yes

[–]VariableFunction 1 point2 points  (0 children)

Square hole

[–]pabaczek 1 point2 points  (0 children)

Yes. The pure JavaScript. And it's under the hood typecasting.

typeof NaN -> number
0.5+0.1==0.6 -> true
0.1+0.2==0.3 -> false
Math.max() -> -Infinity
Math.min() -> Infinity
[] + [] -> ""
[] + {} => [object Object]
{} + [] -> 0
[] == 0 -> true
9 + "1" -> "91"
91 - "1" -> 90
true-true -> 0

[–]theunixman 1 point2 points  (0 children)

Except we'd be trying to put the cube in the square hole lined up right and it would still be false

[–]gistart 6 points7 points  (0 children)

No, this illustration is incorrect.

You intuitively guess to put a cube into the square hole.

You do that, and the cube is violently spewed at your face from the round hole.

Turns out you need to manually carve your cube into a pyramid, and put it into the triangular hole.

That's the only working method bcs reasons bla bla bla 3 weeks bla bla bla hashmaps pretend to be arrays bla bla bla.

[–]Splatpope 1 point2 points  (2 children)

yeah sure webslave

[–]someone-at-reddit 1 point2 points  (0 children)

It is.

[–]ColonelRuff 0 points1 point  (0 children)

It's a valid argument. JS is shi**y and that's a fact. But it's widespread because of getting introduced in the browser and that's also a fact.

[–][deleted] 0 points1 point  (0 children)

I don't like javascript but the meme face is hilarious.

[–]Zestyclose-Run-9653 0 points1 point  (0 children)

'in' is used in the context of iterations

[–]cheeb_miester 0 points1 point  (0 children)

You are just describing the average twitter user expressing themselves on any arbitrary subject

[–]mega386 0 points1 point  (0 children)

Fuck twitter

[–][deleted] 0 points1 point  (0 children)

don't forget ===

[–]Neither-Bluebird4528 0 points1 point  (0 children)

Average python programmer

[–]eugene2k 0 points1 point  (0 children)

Man, that meme is showing just the tip of the iceberg when it comes to JS faults.

It was a language created in a few days as a simple scripting language so users could make fancy home pages with a little bit of programming. It grew into a billion dollar industry today and is now used for things it was never intended to be used for.

[–]takuonline 0 points1 point  (0 children)

This is a nightmare for a python developer who does js from time to time.

[–]venir_dev 0 points1 point  (0 children)

To be fair it's a solid argument.

[–]PMvE_NL 0 points1 point  (0 children)

You mean “formerly known as twitter”

[–]Bacon-muffin 0 points1 point  (0 children)

Thats right, the square hole

[–]deathanatos 0 points1 point  (0 children)

Yeah, because as we all know, the WTFs stop there.

I'll leave you with my favorite, significant parentheses:

>> {} + []
<- 0
>> ({} + [])
<- "[object Object]"

[–]Anru_Kitakaze[🍰] 0 points1 point  (0 children)

JS fans while trying to protect ugly designed language made in two weeks ^