<html>
<head>
<script>
// fetch cookie to check
let cookie = document.cookie;
if (cookie.search("Hello=World") >= 0) {
console.log("Cookie found");
} else {
// create cookie
document.cookie = "Hello=World";
console.log("Cookie not found");
}
// fetch cookie to print value
cookie = document.cookie;
document.write(cookie);
</script>
</head>
<body></body>
</html>
THIS IS NOT WORKING IN THE TUTORIAL AND I HAVE BEEN STUCK FOR 3 HRS PLEASEHELP ME AND PROVIDE ME THE SOLUTION , COURSE JAVASCRIPT LESSON 11, LESSON 7 , COOKIES