Does Anyone know what this means??
I am making a website and I keep getting this error. I was coding a thing for my website where if the user is using a mobile device, it will link to another website that is made for mobile users. All my code is listed below. (The code works by the way I just have no idea what it means and when I look it up I get even more confused.
‘Uncaught ReferenceError: Invalid left-hand side in assignment’
JS:
function isMobile() {
return /Android|iPhone/i.test(navigator.userAgent);
}
console.log(isMobile());
if (isMobile() = false); {
window.location.replace("mindex.html");
}
html(if it helps)…:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>The World Of Numbers</title>
<link href="style.css" rel="stylesheet" type="text/css" />
<link rel="icon" type="image/x-icon" href="R (1).png">
<script src="script.js"></script>
</head>
I have linked all js and css(doubt that makes a big deal) files, and the file “mindex.html” is the file that I am linking to.
Thanks for the help!