title: Access session variables from JavaScript
body: <p>Is it possible to access session variables made in from JavaScript, and how can I replicate this PHP code in JavaScript?</p>
  
  <pre><code>if(empty($_SESSION['name'] {
     echo 'foo';
  }
  </code></pre>