I am trying to make a map of a mall with this script:
<!DOCTYPE html>
<html>
<head>
<title>Display Message</title>
<script>
// (B) CONFIRM
function demoA() {
let sgl = 'Target';
sgl;
var destination1 = prompt("Enter Your Destination", " ");
if (destination1 = sgl) {
return true
var location2 = prompt("Enter Your Closest Store", " ")
alert("Starting Directions to " + destination1)
} else {
return false
}
}
</script>
</head>
<body>
<!-- (D) TEST BUTTONS -->
<input type="button" value="Directions" onclick="demoA()" />
</body>
</html>
But, when I run this, for the destination1 var, I put Target but it doesn't ask me my closest store. Another problem is I am trying to use a string of the name of the stores but I can't get it to work.