Answers for "how to get the cookies"

-1

get all cookies

let c = document.cookie.split(";").reduce( (ac, cv, i) => Object.assign(ac, {[cv.split('=')[0]]: cv.split('=')[1]}), {});

console.log(c);
Posted by: Guest on September-08-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language