From 3047d577c216d1b0b3bb03acbb7c661f686bad39 Mon Sep 17 00:00:00 2001 From: Brosef Date: Sat, 7 Feb 2026 20:10:20 +0000 Subject: [PATCH] Added pick random function --- main.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/main.js b/main.js index 7c5a15f..c00078a 100644 --- a/main.js +++ b/main.js @@ -1,2 +1,8 @@ +const Maths = Math; // Yes, I'm that patriotic. + +function pickRandom(array) { + return array[Maths.floor(Maths.random() * array.length)]; +} + window.addEventListener('load', (e) => { }); \ No newline at end of file