To access a cookie, lookup document.cookie:
const cookies = document.cookie
This will return a string with all the cookies set for the page, semicolon separated:
'name1=Flavio1; name2=Flavio2; name3=Flavio3'
To access a cookie, lookup document.cookie:
const cookies = document.cookie
This will return a string with all the cookies set for the page, semicolon separated:
'name1=Flavio1; name2=Flavio2; name3=Flavio3'
Join my AI Workshop!
The Web Development BOOTCAMP cohort starts in February 2026