Skip to content

Latest commit

 

History

History
122 lines (90 loc) · 2.9 KB

index.md

File metadata and controls

122 lines (90 loc) · 2.9 KB
title description pagination_next oldUrl
Getting Started
A step-by-step guide to getting started with Deno. Learn how to install Deno, create your first program, and understand the basics of this secure JavaScript, TypeScript, and WebAssembly runtime.
/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.