0 votes
in JavaScript by
What is a Cookie in javascript?

1 Answer

0 votes
by

A cookie is a piece of data that is stored on your computer to be accessed by your browser. Cookies are saved as key/value pairs. For example, you can create a cookie named username as below,

document.cookie = "username=John";

Screenshot

...