title: how can i move Value from that function to the other variable on the that is available on out of the function?
body: <pre><code>$(window).load(function(){
  
      $("body").click(function(){
  
          var s = window.getSelection();
          s.modify('extend','backward','word');        
          var b = s.toString();
  
          s.modify('extend','forward','word');
          var a = s.toString();
          s.modify('move','forward','character');
  
          var z=b+a;
  
          z= z.trim();
  
          var jvalue = "Fox";            
  
      });        
  
  }); 
  
  var kvalue = jvalue;
  alert(kvalue);
  </code></pre>