Take for instance python( my personal language). At a minimum you need python installed on the computer. Then you need to deal with issues such as the PATH and PYTHON_PATH. Also you have to understand package naming and import scheme.
With JS you only need a .html text file on the desktop.
Write code, save, double click, results. It is something that anyone who has even seen a computer can understand.
Particularly if the student has not had much experience in computers in general, things like paths, imports, file system knowledge and command line interfaces can be a barrier to learning code. You will eventually need to learn all of the things above to be a programmer but why bore a child or teenager with the details of a file system or command line when you could be showing them how to code animations on a web page.
I will admit, that struggling with run time environment, compilers and class path issues made me into better engineer sooner, but I already had a passion for what I was doing.