I tried this code and when I execute it it gives me true even when I have disabled the cookies in EDge, it does not mark me error or anything, and I need that result to validate the action of a send. I hope you can help me, Thanks!
function myFunction() {
var x = "Cookies enabled: " + navigator.cookieEnabled;
document.getElementById("demo").innerHTML = x;
}