Web developers using Electron probably count in the time to learn C++ vs the fact that they already know web stack. ;)
js targets the browser (angular, React...), the back-end (node), the desktop (Electron) and mobile (React native). Just like the Java of old with applets, javax, JME, and of course weblogic and friends, js today allows you to code anything, as long as you don’t mind doing it badly, insecurely and/or wastefully.
Due to this ubiquity, a large majority of job openings list js in one form or another as a prerequisite (remember when entreprise code was synonymous with Java?)
Once you know enough js to be dangerous, there’s little incentive to pick up another programming language.