[go: up one dir, main page]

Skip to main content
On this page

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 Jump to heading

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 Jump to heading

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:

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

console.log(greet("world"));
main.js
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 Jump to heading

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

Did you find what you needed?

Privacy policy