Skip to main content
variable fillArray
import { fillArray } from "https://deno.land/x/30_seconds_of_typescript@v1.0.1/util.ts";

Initializes and fills an array with the specified values.

Use Array(n) to create an array of the desired length, fill(v) to fill it with the desired values. You can omit val to use a default value of 0.

type

(n: number, val?: any) => unknown