# Tutorial: JavaScript

## JavaScript

JavaScript? Why JavaScript?

### Ubiquitous:

Well, for one thing, it's everywhere! It's on your laptop/desktop. But more it's in your pocket (phone). In particular it's where every there is a browser. From my phone, using it's browser, I can run a model:

### Deployability:

OK, I want to give you my great new app. First download the app, then download its language and environment. Oh then a window manager for it.

Really? For JavaScript apps, a URL. That's it! Sure a lot easier.

To be sure, this shifts the work to the developer. But GitHub, the remote Git repository site, allows the developer to make their project act like a hosting service. This is how AgentScript manages what you are now reading!

### Standard

Did you know it is Against The Law to produce a version of JavaScript that is not backward compatible?!

Why? It would Break The Web. So if you run a script from 1998, it will run on today's browsers. See ECMAScript and TC39 for details.

### Ecologies

JavaScript obviously runs in the browser, on phones, tablets, and desktops.

But it also runs in Node.js, originally as a JavaScript based HTTP server, but also as a desktop JavaScript developer environment. It is used by developers to deploy their code, using NPM, the Node Package Manager. NPM hosts 1,452,901 packages with 25,278,141,966 downloads last week!

And a more recent cousin of Node, Deno, both authored by Ryan Dahl, has just started up and is a good way to learn JavaScript. It uses URLs for loading all dependencies, local or remote, making it more browser-like and easier for browser programmers to learn.

Finally, Electron is a true JavaScript application engine which Visual Studio Code, the popular code editor, is built upon. It even uses the browser's core as a window manager. Slack, the team management app, is also built on Electron. Here is a list of Electron Apps