title: Javascript: Use function as variable
body: <p>Is there a way to use a variable name which has a function assigned to it, for example, to get the actual width of an element?</p>
  
  <p><code>var xvar = function(){ return $('#y').width()}</code></p>
  
  <p>And use it as</p>
  
  <p><code>console.log(xvar);</code></p>
  
  <p>Instead of</p>
  
  <p><code>console.log(xvar());</code></p>