title: How can i make my variables visible outside of their range?
body: <p>I have a function with some variables and I want to make it visible outside this function, but the console does not recognize it</p>
  
  <pre><code>&lt;b:tag name='script' type='text/javascript'&gt;
  
  (function(){var snapAuthor=AuthorsInfo.filter(function(a){return a.name===&amp;#39;&lt;data:title/&gt;&amp;#39;})[0];
  
      if(snapAuthor!==undefined){
      snapAuthor.provided=true;
  
      &lt;b:loop values='data:links' var='link'&gt;
      &lt;b:if cond='data:link.name contains &amp;quot;-ad&amp;quot;'&gt;snapAuthor[&amp;#39;&lt;data:link.name/&gt;&amp;#39;]=&amp;#39;&lt;data:link.target.jsEscaped/&gt;&amp;#39;;
      &lt;b:else/&gt;
      &lt;b:switch var='data:link.name'&gt;
      &lt;b:case value='rank'/&gt;snapAuthor.rank=&amp;#39;&lt;data:link.target.escaped/&gt;&amp;#39;;
      &lt;b:case value='about'/&gt;snapAuthor.about=&amp;#39;&lt;data:link.target.escaped/&gt;&amp;#39;;
      &lt;b:default/&gt;snapAuthor.links[&amp;#39;&lt;data:link.name/&gt;&amp;#39;]=&amp;#39;&lt;data:link.target/&gt;&amp;#39;;
      &lt;/b:switch&gt;&lt;/b:if&gt;&lt;/b:loop&gt;}})();&lt;/b:tag&gt;
  </code></pre>
  
  <p>and this is the recall function :</p>
  
  <pre><code>$("#Auth-Sec .LinkList").each(function(){
  var e = $(this);
  var getName= e.find(snapAuthor.name); // snapAuthor is not defined
  if (getName=== AuthorName){
  $("body").hide();
  }
  console.log(getName);
  });
  </code></pre>
  
  <p>Note the name of the <code>snapAuthour</code> variable..
  i want a way to make it visible while remaining in place and thanks &lt;3</p>