title: Printing JQuery cookie data to console, using cookie plugin
body: <p>I am currently trying to store a variable userScore in the cookie userScoreCookie using the JQuery cookie plugin. When i console.log the contents of the data printed is 'undefined'. What is causing this?</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var cookieValue;
  var userScore = 0;
  $.cookie('userScoreCookie', 'userScore', {path: '/',expires: 365});
  cookieValue = $.cookie("userScoreCookie");
  console.log("cookie score: " + cookieValue);</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.js"&gt;&lt;/script&gt;</code></pre>
  </div>
  </div>
  </p>