title: Whether a variable is undefined
body: <p>How do I find if a variable is undefined?</p>
  
  <p>I currently have:</p>
  
  <pre><code>var page_name = $("#pageToEdit :selected").text();
  var table_name = $("#pageToEdit :selected").val();
  var optionResult = $("#pageToEditOptions :selected").val();
  
  var string = "?z=z";
  if ( page_name != 'undefined' ) { string += "&amp;page_name=" + page_name; }
  if ( table_name != 'undefined' ) { string += "&amp;table_name=" + table_name; }
  if ( optionResult != 'undefined' ) { string += "&amp;optionResult=" + optionResult; }
  </code></pre>