Hello world with Deno

Hello, Deno Deno is a new platform for writing applications using JavaScript and TypeScript. It is based on the V8 JavaScript engine and the Rust. Deno’s lowest…

Ashish Sharma
Ashish Sharma
June 02, 2020

Hello, Deno

Deno is a new platform for writing applications using JavaScript and TypeScript. It is based on the V8 JavaScript engine and the Rust.

Deno’s lowest level binding layer to the system is tied to promises (called ops). Deno is secure by default, provides first-class TypeScript support, has built-in utilities like a dependency inspector, and supports third-party modules such as lodash .

Btw, this is the best damn geeky one-liner code to explain what is Deno. Totally cool.

alt_text

Installation

Deno works on macOS, Linux, and Windows. Deno is a single binary executable and it has no external dependencies.

See all installation.

Install Deno on Windows 10/8/7

Launch Windows PowerShell and run the following command to install Deno on Windows 10/8/7

iwr https://deno.land/x/install/install.ps1 -useb | iex

Install Deno on Linux and macOS

Launch terminal and run the following command to install Deno on Linux and Mac

curl -fsSL https://deno.land/x/install/install.sh | sh

Open a new terminal and run deno. You should get a > prompt. Type exit.

After installing deno on your system we just need to create a simple Hello World program by using the following steps :

Step 1. Create a Folder as per your project name by using command prompt

mkdir HelloWorldDeno

Step 2. Create a typeScript file and name it index.ts.

Step 3. Add the following code in index.ts.

const helloWorld = (name: string = "world") => {
  console.log(`Hello ${name}!!`);
}

helloWorld();

helloWorld("Friend");

Step 4. Run the following project by using the following command

deno run index.ts

You can check the result here

alt_text

Yupppp it works this is your first Deno program !!


LoginRadius Docs

Implement Authentication in Minutes

click here

Most Popular Tags

EngineeringCSSNodeJSSocialLoginJavascriptOAuthAuthenticationDenoFacebookPHP
Ashish Sharma

Ashish Sharma

Ashish is a software engineer who continually seeks clean, elegant solutions to business challenges. His lifelong passion for technology drives him to proactively expand horizons, constantly exploring and evaluating new languages, platforms, frameworks and tools.

View Profile

Try a Modern Authentication Solution

$0/ month

Free Sign Up
  • 5,000 MAU
  • 1 Web or mobile app
  • Standard login
  • 3 Social Login Providers
  • Transactional Email Template
  • Customizable Login Interfaces