I have a number of elements in an array and I want some of them to have a higher likelihood of being chosen, than other ones. In this jsfiddle example, I made a simple array and function that will allow certain elements to be chosen far greater than other ones. However, the array I used was very small because it only had 5 elements. I'm thinking about using around 50 or so elements.
Like This
"job":["Teacher", "Doctor","Nurse","Unemployed","Engineer","Mechanic", "Welder", "Cashier","Police Officer","Waiter","Cook",
"Security Guard", "Construction Worker","Truck Driver","Accountant","Carpenter","Operations Manager","Lawyer","Electrician",
"Bartender","Lawnman"]
So I don't have time to make an if or else if statement for everyone of the array elements. There has to be a better way to do this right?