JavaScript obtenga un valor de cookie un forro

const value = ('; '+document.cookie).split(`; COOKIE_NAME=`).pop().split(';')[0];
Gershom Rogers