JavaScript is a language that's neither abstracted from the basic programming concepts nor its syntax is alien. Most of the people who picked it up can learn many other mainstream programming languages in a week, if not a weekend. Add 1-2 more weeks and they're writing GUI code.
Yet, they don't.
JavaScript is popular for pragmatic reasons (a.k.a. "it delivers results"), so is PHP. They aren't the best languages, but developers who choose them aren't simpletons who can't code in other languages.
They are both deeply, deeply flawed (though I have learned to love JS's good parts, while I still hate PHP).
I have programmed in many languages - Java, Python, Scheme, and Bash are all ones I've worked in professionally, and I've spent plenty of time in Emacs Lisp. This doesn't touch on the ones I've tinkered with for fun.
JS and PHP are not the best languages, but they work, they're everywhere, and they're usually what your client already has in place.
Changing languages rarely delivers any actual business or end user value.
So, I work in what the client has.
JS will long outlast PHP, because it's such a massively deployed language and browsers can effectively never remove support for it.
PHP may slowly die out, since it's strictly on the backend, where you can choose your language.
Yet, they don't.
JavaScript is popular for pragmatic reasons (a.k.a. "it delivers results"), so is PHP. They aren't the best languages, but developers who choose them aren't simpletons who can't code in other languages.