- You can call it "Java" to enrage other programmers
- You can compare numbers against strings without wasting time converting them
The part that always gets me is when people choose Js for the backend. Like I get that it's the default thing that works on the frontend, so there's some rationale why you might not want to transpile to it from another language. On the backend though, there are so many far better option, why would you willingly go with Js, especially given that you're now forced to do all your IO async.
1 - Easiest way to run a script in your browser
2 - Always finds its way if inputs are bad
Nan - undefinedhmm, let's see.
It's not java.
It's also not a scripting language.
also to the repeat grammar nazi in the comments here, hi, "its"
It’s also not a scripting language.
It definitely is a scripting language.
hello-world.js
:#!/usr/bin/env node console.log("Hello world");
Your favorite command line tool:
chmod +x ./hello-world.js ./hello-world.js
You just need to install
npm
, eg viaapt-get install npm
.everything is a scripting language if you try hard enough.
- Is available to be used in website scripting.
- Not quite as full of footguns as PHP (although it is close).
Browsers love it!
Practically anything you write will execute without all that scope and well formed statements nonsense.
Mind you, number 2 is also its biggest flaw as well, but…
A lot of people are familiar with it and........um....hackers like it being in use?
Damn this is hard. I keep java script disabled by default so its hard to say anything good. I begrudgingly have to whitelist websites i need that cant run without it.
I feel like that's more because you don't want websites you visit running code than because you dislike this particular programming language
Thats true. It is more to do with code execution than the language itself.