title: (JavaScript) Cookie is not being created
body: <p>I'm trying to use cookies for a project I have, so I looked for a method to create them using JavaScript and found, looking on some websites, a function (it looks like a function) called <code>document.cookie</code>. Using the following code on the console:</p>
  <pre><code>var value = &quot;testCookie&quot;;
  document.cookie = &quot;testCookie=&quot; + value + &quot;;&quot;;
  alert(document.cookie);
  </code></pre>
  <p>The alert, which should contain the cookie, appears blank, as if the cookie had not been created. What am I doing wrong? If you can tell me, I will be immensely grateful!</p>