I have this code that is counting the amount of Clicks, but I wanted it when I close the Browser the counter does not clear.
var p = document.createElement("p");
document.body.appendChild(p);
$(document).ready(function(){
var cout = 0;
$("#btnCount").click(function(){
cout = cout+1;
$('p').html(cout);
});
});
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.3.1.min.js"></script></head><body><buttontype="button" id="btnCount">Click me</button>
</body>
</html>