What I am trying to do is set a variable specified in a function to something, see below if that doesn't really make sense.
function getRandomFromArray(arrayName,storeVariable)
{
storeVariable = arrayName[Math.floor(Math.random() * arrayName.length)]
}
var petTypeArray = ['Cat','Dog','Ferret','Spider','Companion Bot'];
getRandomFromArray(petTypeArray,petType)
For example, set petType to a random string in petTypeArray. Am I doing it right? Am I able to do it like this?