add content

This commit is contained in:
JOLIMAITRE Matthieu 2024-06-18 03:14:30 +02:00
parent 94df7c8562
commit cc9afc5ffe
140 changed files with 10414 additions and 1 deletions

View file

@ -0,0 +1,13 @@
#!/usr/bin/env -S deno run
const { args } = Deno;
const { random, floor } = Math;
function pick_rand(options) {
const fac = options.length * random();
const index = floor(fac);
return options[index];
}
let chosen = pick_rand(args);
console.log(`chose '${chosen}'.`);