Skip to content

Latest commit

 

History

History
121 lines (89 loc) · 2.7 KB

index.md

File metadata and controls

121 lines (89 loc) · 2.7 KB
title pagination_next oldUrl
Getting Started
/runtime/getting_started/first_project/
/manual/
/runtime/manual/introduction/
/manual/introduction/
/runtime/manual/
/runtime/manual/getting_started/

Deno (/ˈdiːnoʊ/, pronounced dee-no) is an open source JavaScript, TypeScript, and WebAssembly runtime with secure defaults and a great developer experience. It's built on V8, Rust, and Tokio.

Let's create and run your first Deno program in under five minutes.

Install Deno

Install the Deno runtime on your system using one of the terminal commands below.

curl -fsSL https://deno.land/install.sh | sh
irm https://deno.land/install.ps1 | iex
curl -fsSL https://deno.land/install.sh | sh

Additional installation options can be found here. After installation, you should have the deno executable available on your system path. You can verify the installation by running:

deno --version

Hello World

Deno can run JavaScript and TypeScript with no additional tools or configuration required. Let's create a simple "hello world" program and run it with Deno.

Create a TypeScript or JavaScript file called main and include the following code:

function greet(name: string): string {
  return `Hello, ${name}!`;
}

console.log(greet("world"));
function greet(name) {
  return `Hello, ${name}!`;
}

console.log(greet("world"));

Save the file and run it with Deno:

$ deno main.ts
Hello, world!
$ deno main.js
Hello, world!

Next Steps

Congratulations! You've just run your first Deno program. Read on to learn more about the Deno runtime.