I often use functions like this one:
function elem(name){
return document.getElementById(name);
}
Which is used like so:
var box = elem('box');
Often, the name of the variable I'm creating is the same as the string passed to the elem function.
How can I create a function that returns an element with the same id as the variable name?