createCookieInHour: (cookieName, cookieValue, hourToExpire) => {
let date = new Date();
date.setTime(date.getTime()+(hourToExpire*60*60*1000));
document.cookie = cookieName + " = " + cookieValue + "; expires = " +date.toGMTString();
},
//create any new cookie
createCookieInHour('cookieName', 'cookieValue', 5);
//view cookies
let cookie = document.cookie.split(';');
console.log('cookie : ', cookie);