DEV Community

Cover image for Deno: Javascript from the terminal
netsi1964 🙏🏻
netsi1964 🙏🏻

Posted on

Deno: Javascript from the terminal

Javascript has evolved from a script to allow for dynamic HTML in the browser to TVs and a valid solution to execute online Javascript code directly in your terminal

I am excited to follow how one of the latest innovation in the domain of Javascript, Deno, will impact our world. It is a potential replacement of NodeJS, and it was invented by the guy fostering NodeJS. I will not go into any explanation of that story, I just want to point out that Deno has the potential to add yet another domain to the domains which have embraced Javascript.

In short...

The cover image of this post shows how easy you can execute javascript (actually Typescript) code which is located somewhere on the internet without having to install anything else than Deno.

First time you run the command deno run https://deno.land/std/examples/welcome.ts the code is fetched and executed. It is also stored locally, so that next time you want to run the code you will get the cached version of the code.

Some ideas

This approach where you can point to an URL containing some javascript/typescript and then execute it allows you to take your javascript skills to a brand new level. You can share your pieces of code online, use from anywhere and with open source community starting to develop pieces of code this way - you could make way for even more cross platform sharing of code.

I am happy to see javascript evolve in this way. Some years back I teased a backend developer that he would soon start coding in javascript, he laughed. Then came NodeJS and he stopped laughing, rightly taking javascript serious. Now I say: "Soon your terminal commands will be using javascript too!" - let's see who will stop laughing now! :-)

PS: Now we just need mobile OS start taking javascript serious too! So that you can execute javascript native on iOS and Android :-)

Top comments (0)