Javascript
Getting Started with Deno — Hands On

Command Line Arguments Solution

PRO

Here's one possible solution to the assignment, where you accept a name as the command line argument for the "Hello, world" message:

// command-line-arguments.ts

console.log(`Hello, ${Deno.args[0]}!`);

You can run the file like this:

deno run command-line-arguments.ts Preston

That will result in the following output:

Hello, Preston!