A simple function to erase cookie with JavaScript. All you have to do is to pass the cookie name.
Function
function eraseCookie(name) {
createCookie(name, "", -1);
}
Calling The Function
eraseCookie('country');

Leave A comment
Email address is optional and will not be published. Only add email address if you want a reply from blog author.
Please fill required fields marked with *