I am making a new video game and I need help with a purchase feature. I want to use local variables to "create" a global variable. For example:
function example(apple,banana) {
return unicorn.apple.banana.text
}
example(taco,burrito);
should return whatever unicorn.taco.burrito.text
equals.