Say something bad and bad about JavaScript

...

no block scoped variables
callback hell
automatic semicolon insertion
equality checking does not work

> no block scoped variables
const and let, bitch

> callback hell
promises, bitch

> automatic semicolon insertion
i stopped using semicolons altogether and that has caused literally zero problems

> equality checking does not work
== and === are different for a reason, you simp.

can we get someone in here that knows wtf they are talking about?

I've got a harder challenge.
Say something good about javascript.

> 0 && console.log('lmao')
0
> -1 && console.log('lmao')
lmao
>1 && console.log('lmao')
lmao

>0 === false
false
>0 === true
false

Its type system is apauling. For anyone who says it isn't, why have Google, Microsoft and Facebook all created statically typed languages that transpile to JavaScript.

NPM is a rubbish package manager. The bloat is unreal and the quality of packages is shit. A whole module for left padding a string??? Fuck me sideways...

The quality of its developers is shocking. Most of them are cargo cult code academy MacBook using plebs. They all have this "oh let me rewrite everything in FLAVOUR_OF_THE_MONTH_FRAMEWORK" attitude.

This one isn't really JavaScript's fault but the inconsistencies across browsers is bad. Nothing is ever simple, there's always caveat or fuckerage hiding somewhere.

JavaScript is also responsible for 90% of the adverts, mining scripts, malware, scams, bugs and resource consuming shit on the internet these days. I dream of a web where properly HTML semantics replaced 90% of the use cases of today's JavaScript.

>0 == false
true

>0 == true
false

The major downside of JS is the community, shitty browser vendors and an actual good package manager (Yarn is great at least).

>1 == true
true
>-1 == true
false
>-1 && console.log('kek')
kek

:^)

>
>
What a surprise, nothing was returned for this question

none of you retards mention that javascript is the grandaddy of all internet browser related security vulnerabilities?

>none of you retards mention that javascript is the grandaddy of all internet browser related security vulnerabilities?
that would be flash

Yes but flash isn't relevant after 2012 and now if you to L33T H4X0R the hell out of someone you use JS related vulnerabilities

({ [undefined]: true })[(() => {})()]

i don't get the ones with && console.log

> [1, 2, 10].sort();
> (3) [1, 10, 2]

The instant classic.

Turns out doubles aren't booleans who knew

it's not java

What a retarded way to do { undefined: true }[undefined]

When you blindly use a function and ignore it's specification, you get strange results. Gee, who knew? /s
> [1, 2, 10].sort((a, b) => a - b);
> (3) [1, 2, 10]

Good trick to make it works though
>typo: ({ undefined: true })[undefined]

there is nothing bad about javascript because its a language you compile. Clojurescript is the best javascript compile btw.

>Type system is complete and utter disgusting garbage
>Millions upon millions of security vulnerabilities
>Millions of flavour-of-the-month meme frameworks and libaries because JS devs are generally so incompetent, library devs are in a constant competition as to who can hold JS dev babby hands the hardest
>As a consequence JS is bloated as fuck. JS devs also think they should be able to get away with all of this shit simply because computing power increases every year.

You guys are great at making examples of useless shit. Great way to show how bad a language is.

When do you ever have to compare a integer with console.log????

Also Typescript fixes a lot of your examples.

there is literally nothing wrong with javascript other than a lack of a decent nonbrowser runtime that isn't hacky dogshit eval() wrapping bullshit, e.g. nodejs.

what is activex

samefag

also, js has async and await now (which are basically promises)

>Its type system is apauling. For anyone who says it isn't, why have Google, Microsoft and Facebook all created statically typed languages that transpile to JavaScript.
To make it more robust, easily testable, and more friendly to .NET developers. Which is great in my opinion, you can have some Enterpriseā„¢ MAX Security Business App, and use .NET+TS for that. On the other hand, you don't need all of that for your every project, and you can easily write some weekend fun project in Node and plain JS, and still use some of the code you've written in TS.

>NPM is a rubbish package manager. The bloat is unreal and the quality of packages is shit. A whole module for left padding a string??? Fuck me sideways...
True, use Yarn. Also, seems to me that you are mixing the npm tool with the repository itself. Nobody forces you to use their repository, you could easily just set git url in packages.json. And I don't see a problem having with many packages, even if it's something ridiculous as left padding a string. You can look at it as a github, everyone is free to publish, it's up to you to install it or not.

>The quality of its developers is shocking. Most of them are cargo cult code academy MacBook using plebs. They all have this "oh let me rewrite everything in FLAVOUR_OF_THE_MONTH_FRAMEWORK" attitude.
True. Really cancerous community, just look at npm core and past node (now ayojs) members. But that's what you get being a most popular language (according to github) ... or was that the product of developers trying to rewrite everything in JS?

>This one isn't really JavaScript's fault but the inconsistencies across browsers is bad. Nothing is ever simple, there's always caveat or fuckerage hiding somewhere.
As far as I know all major browsers implement ES standard correctly, but if user insists on using IE6 in 2017 it's his fault. Still, there are some tools, like Babel, that will help you deal with those fools.

>JavaScript is also responsible for 90% of the adverts, mining scripts, malware, scams, bugs and resource consuming shit on the internet these days. I dream of a web where properly HTML semantics replaced 90% of the use cases of today's JavaScript.
Kinda agree with this one. JS is currently trying to do too much. Using noscript shouldn't prevent users from viewing your site. (But I'm still guilty of doing a lot of SPAs recently)
Exploits will always exist, if not JS then something else, just remember the ActiveX times and million IE toolbars.

Bad: it's used way too often and usually for malicious purposes

Good: it's easy and powerful

JS is a good language, but it has room for improvement

jQuery is garbage though. I loathe everything about it.

node will probably stay around for a while, but javascript only on the front-end has to die. it's fucking inconsistent and what solutions people provide? more javascript (jquery, react, angular, etc), which hurts the end user experience because of the bloat. not to mention angular 5 recently came out and guess what, more breaking changes since 2012. none of the major browser vendors seem concerned about the inconsistences and it's been a problem ever since javascript came out.

it's honestly baffling how there aren't any other options or how they're not well supported yet. webassembly is still niche shit.

You'll never find a job

>I loathe everything about it.
Nice to see you loathing something you don't know, user.

Maybe in your country, in europe although(France in my exemple) it's spreading heavily, MERN/MEAN stacks are fucking everywhere and well paid

Its testing short circuit logic
If you have Boolean and Boolean, if the first Boolean is false the whole thing will always evaluate to false and its unnecessary to even check the second one
So when this autist does Number && statement he wants it to not run the statement because his arbitrary number should evaluate to false
Its nitpicking autism
Notice how he shows that
0 && console.log('hi')
Prints hi
But fails to show that
false && console.log('hi')
Doesn't print shit
He's using the language wrong on purpose and then complaining about it, sad!

I meant to put -1 for the example because
0 && console.log('won't print')
Basically using numbers as Boolean is stupid, 0 represents false 1 represents true but anything beyond that is unpredictable

It's really good. Weak typing, higher order functions and other things allow me to program more easily and concisely. But browsers suck, node js sux and community sux and is filled with webdevs who use it wrong

implying javascript is not the only official browser side language , the same would happen with other languages. Only normalfags uses shit like noscript.

>It has no operator overloading
>normies are trying to make it look like java while prototype based programming its interesting for artificial intelligence

Everything else rules on javascript.

Javascript is the future for AI + IOT .

Prototype based objects

Obviously you're retarded

>t. a NEET

Definitely too much frameworks, and instead improving the language itself, people make their own framework with blackjack and hookers.
Future-proof code is the biggest problem for me. Due to market needs, I stuck with angularjs for too long. Now that I look at it, most of the stuff I've written is useless. Now I'm leaning towards writing plain JS. Never really got into React, but I've heard it's much closer to plain JS and doesn't try to provide full solutions/be a complete framework like angular.
I really hope Web Components would kill all that crap.

>but anything beyond that is unpredictable

When evaluating expressions, there's a specific set of values that evaluate to false, everything else evaluates to true.

Those values, IIRC, include 0, "", [ ], null, undefined and NaN.

Some of those might seem arbitrary, but after using JS for some time I personally think that all of those make sense for writing conditions.

Using numbers for boolean values in data is retarded though.

[] evaluates to true you fucking idiot. Goes to show how much JS """code artisans""" know about their own language.

It's followed by hipster "developers" who ruin software just to be "cool". Node.js is shit. It is more shit than Java can ever be.

>Definitely too much frameworks, and instead improving the language itself, people make their own framework with blackjack and hookers.

Trying to do it all in the spec would be a disaster.

People complain about the churn but it exists for a very good reason: we still don't have this shit figured out. We're using a platform intended for distributing and viewing documents as an a platform for complex GUI applications. The changes we've seen, from jQuery to MVC based frameworks to reactive virtual DOMs and one way data binding, have been a huge improvement, but they're still terrible in a lot of ways. There are a ton of ideas out there to improve them. But we need time to try them out, and to sort the good from the bad.

If the ecma people had to choose one solution, we would have ended up stuck with some version of jQuery as the official solution for the next decade+...

whats the best way to do limited concurrency with promises in javascript?

for example, uploading thousands of files but only 10 at a time,

yeah, i've been playing with react and the jsx syntax is easy (basically just javascript + html) and it's kinda flexible (you can use functions or classes, javascript or typescript, make a top-bottom or bottom-top component architecture, etc), but i feel the same way, web components should be the "standard" instead of react or whatever.

I can't think of a one true way to achieve that, but I don't think that'd be too complicated. Just make a function that consumes Promises or something

>that'd not be too complicated
oops

bad name (is it java or what?)
no humorous historical documentary (yet)

Terry solved security for us already.

If you like security, don't network.

upvoted

>upvoted
???

Yeah, and IOT is a meme

123 test

Use a promise pool.

not really.

it's basically an easy mode service model for a lot of people.

I know where I work, selling shitty Single board computers running some nodejs app doing cloud shit is free $$$

Parse times are horrible, especially on mobile devices.

There should be a bytecode format for JS. Not wasm. One that is basically a pre-parsed JavaScript.