LocalStorage vs SessionStorage vs Cookies

Code

Some developers may find it difficult to explain the difference between localStorage, sessionStorage cookies.