Fine but its dangerous. Javascript/Ecmascript, is a poor designed language, the scope of the variables is broken. Instead, PHP is well defined in this aspect.
But I'd like to point out that "the scope of the variables is broken" doesn't make any sense: prior to ES6 JavaScript only had function scope -- which is not broken but also not what most people are used to. ES6 added let/const which are block scoped (and thus more familiar). Neither of the two is broken, nor did the addition break anything.
The only oddity I can think of that would provoke such criticism would be a misunderstanding of non-strict-mode JS's behaviour with regard to implicit globals, e.g. what happens outside strict-mode when variables are used without being declared or what the "with" statement does (which is heavily discouraged). But that's like saying PHP is stupid because its array literals look weird.
Clue 1: it praises PHP. Even PHP apologists usually restrict themselves to simply defending PHP rather than praising it.
Clue 2: it calls JS "dangerous" and "poor designed" (sic). This is vague but provocative enough to invite emotional responses rather than factual discussion.
Clue 3: it explicitly calls out "the scope of variables" as "broken". Again this is vague enough to be ambiguous but strongly worded enough to seem insulting. This is especially confusing if contrasted with PHP, which isn't exactly known for being intuitive and simple in that regard: http://php.net/manual/en/language.variables.variable.php
But you're right, which is why I said it seems like an obvious troll comment rather than insisting that it can only be that. It might just be a poorly worded expression of frustration stemming from an incomplete understanding. Hence my attempt at a factual response.
I don't really think anyome ought to be starting flame wars over whether PHP or JS is a poorly designed language. It's like watching Hitler fight Stalin.
But I'd like to point out that "the scope of the variables is broken" doesn't make any sense: prior to ES6 JavaScript only had function scope -- which is not broken but also not what most people are used to. ES6 added let/const which are block scoped (and thus more familiar). Neither of the two is broken, nor did the addition break anything.
The only oddity I can think of that would provoke such criticism would be a misunderstanding of non-strict-mode JS's behaviour with regard to implicit globals, e.g. what happens outside strict-mode when variables are used without being declared or what the "with" statement does (which is heavily discouraged). But that's like saying PHP is stupid because its array literals look weird.