<html>
<head>
<script>
// fetch cookie to check
let cookie =document.cookie ;
if(cookie.search("Hello=World")>=0)
{
console.log("Cookie found");
}
else {
document.cookie="Hello=World";
}
cookie = document.cookie;
console.log(document.write(cookie));
</script>
</head>
<body>
</body>
</html>