Given all the security issues that Javascript has, why is it still one of the world's most popular languages? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 7

Given all the security issues that Javascript has, why is it still one of the world's most popular languages?

I remember when JS first came out, web surfers were told to turn it off because it was too easy to inject malicious code into a web page with it. These issues are still here today.

12th Jun 2017, 1:26 AM
Karl T.
Karl T. - avatar
4 Answers
+ 7
https can only prevent man in the middle attacks, but not XSS ( cross site scripting).
12th Jun 2017, 1:50 AM
Karl T.
Karl T. - avatar
+ 6
Javascript currently is the heart of the web. Even with its defects, the web needs it to function.
12th Jun 2017, 4:23 AM
Manual
Manual - avatar
+ 4
Agree with @Manual, more than half the Internet runs on JavaScript. I guess we'll have to wait and see if the issues are fixed or if JavaScript gets replaced with another language like Dart. I think the latter is more likely since almost all of the community is focused on learning the latest framework/library and making a new framework to cover the shortcomings (trade-offs) of an existing framework.
12th Jun 2017, 4:55 AM
Nihar Raote
Nihar Raote - avatar
+ 3
it's going to be the same with anything - if there's a way to add functional code then some people will do bad things with it. In fact it's safer on the web with JavaScript as you can't directly access the computer filesystem or run stuff without user's permission - that's why they try to get you/use exploits to download nasty things! In pretty much any language I can think of, you could write 3 or 4 lines of code to kill a pc stone dead - you just need to get someone to run it. //simplistic pseudocode: myFilesystem = getFilesystemObject() myFilesystem.delete(myFilesystem.getRootDirectory() ) //end of pc Get a good antivirus, anti-malware and don't download cracked software!
15th Jun 2017, 6:25 AM
Phil Servis
Phil Servis - avatar