Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created November 30, 2021 20:53
Show Gist options
  • Save parzibyte/dbd11b28e6fb624dae2c1d94f36dfe7d to your computer and use it in GitHub Desktop.
Save parzibyte/dbd11b28e6fb624dae2c1d94f36dfe7d to your computer and use it in GitHub Desktop.
const nombres = ["Luis", "Chris", "Link", "María", "Maggie", "Grim"];
const aleatorio = nombres[Math.floor(Math.random() * nombres.length)];
console.log("El arreglo es: ");
console.log(nombres);
console.log("Y un aleatorio es: ");
console.log(aleatorio);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment