title: Return value NaN from function
body: <p>Here is my function, this works:</p>
  
  <pre><code> my.SetTablepagerIndex = function() {
      var blah = $("#currentPage").text();
      var test = blah.indexOf("o");
      var pagerIndex = $.trim(blah.substring(4, test));
      return pagerIndex;
  }
  </code></pre>
  
  <p>then, i'm assigning that to a var.  why doesnt this work?  I just get a 'NaN'</p>
  
  <pre><code>var index = Util.SetTablepagerIndex();
  </code></pre>
  
  <p>I don't want to declare a global variable, so if what i'm doing is a bad thing what's a better way to pass this value?</p>