Sorry, I'm new to JS and can't seem to figure this out: how would I do probability?
I have absolutely no idea, but I'd like to do something: out of 100% chance, maybe 0.7% chance to execute function e();
and 30% chance to execute function d();
and so on - they will add up to 100% exactly with a different function for each, but I haven't figured out exactly how to do this in any form.
What I found is mostly strange high school math tutorials powered by Javascriptkit or something.