title: How to get and set cookies in JavaScript
body: <p>Getting and setting Cookies via JavaScript feels a little odd like this:</p>
  
  <p>Set: <code>document.cookie = "&lt;key&gt;=&lt;value&gt;[;expires=&lt;utc_expires&gt;[;path=&lt;path&gt;]]";</code></p>
  
  <p>Get: <em>parse document.cookie</em></p>
  
  <p>I found this get and set function on <a href="https://www.w3schools.com/js/js_cookies.asp" rel="nofollow noreferrer">W3C.org Cookies</a></p>
  
  <p>Is there a more elegant/easy way to do this?</p>