var eg = "one"
var eg2 = "two"
var eg3 = "three"
function randomchoose() {
var rand = ["eg", "eg2", "eg3"];
var act = [eg, eg2, eg3];
choose = rand[Math.floor(Math.random()*rand.length)]
chosen = act[choose]
return [chosen, choose];
}
my issue with this is that I don't know how to make "chosen" be the variable that was randomly chosen.
basically, if it rolls eg, i want chosen to be "one" and same goes for others
------EDIT------ I forgot to specify, i need it to return the variable name as "choose" and the actual value as "chosen"