DEV Community

Discussion on: Which functions/methods do you...

Collapse
 
psnapier profile image
P.S. Napier • Edited

I have an rng function that returns a random number between 1-x, and a randomizer function that returns a random item from an array-- the latter is probably used even more than the former!

I also set up a janky function to populate complicated dropdown menus based on arrays and nested arrays (element ID, array, dropdown type). I've ended up reusing it much more than anticipated, so should probably refactor it, ha.

Collapse
 
joelbonetr profile image
JoelBonetR 🥇

We all have those TODO: Refactor this function/method at the bottom of our TODO list 😂