It is common in JavaScript to avoid unnecessary variables, as it reduces the size of JS codes, though readability of defining individual variables is better. In a simple example,
var e=document.getElementById('text');
var text=e.innerHTML;
var d=document.getElementById('test');
d.innerHTML=text;
this can be reduced to
document.getElementById('test').innerHTML=document.getElementById('text').innerHTML;
I wonder if this has any benefit from performance point of view. Does avoiding excess variables reduce memory usage and enhance process speed?
Is it a serious issue? and it is always recommended to minimize the JS code by avoiding individual variables?