I am trying to make it where if one function runs and defines the variable the other function will be able to reconize the function. I'm a little new to Javascript so my code may be just a bunch of jibberish.
function next() {
var random = Math.floor(Math.random() * 15)
document.getElementById("image").src = picture[random];
console.log(random);
}
function who() {
var thing = things[random];
var text = document.getElementById("am").innerHTML = "I am " + thing + ".";
console.log(text);
}