Skip to main content

variable Deno.args

Returns the script arguments to the program.

Give the following command line invocation of Deno:

deno eval "console.log(Deno.args)" Sushi Maguro Hamachi

Then Deno.args will contain:

[ "Sushi", "Maguro", "Hamachi" ]

If you are looking for a structured way to parse arguments, there is parseArgs() from the Deno Standard Library.

Type #

string[]

Did you find what you needed?

Privacy policy