Earlier quoted context omitted.
I do not think that javascript as a language has much advantages for learning than, let's say Lua or Python. However, the fact that it is linked to HTML and DOM make it very easy to have immediate feedback without installing any tooling or IDEs. But then, modern JavaScript is quite different from what one can learn just by using the devtools. I think that once one starts to use more advanced js tooling, things get qu…
You're making a mistake of putting a box around "JavaScript the Language" -- even admitting a concession of "HTML and DOM" you miss the point: Lua and Python do not have billions of devices able to download and run their applications. Python and Lua don't have that by a long shot.
If we compare pure Node with Python then I think python is better for learning as it has less weirdness to it.
You are right though. Such comparison is only useful as a mental exercise as in the real world the browser and js are intimately tied.