What's wrong?


#1

var answer = prompt("What your name?");
var not =["Hi "+answer,"Nice","to meet you"]
if(answer="Michael") {
console.log("Same name");
} else {
for (i=0;i<3;i++) {
console.log(not[i]);
}
};

even though i typed another name, it only shows "Same name".


#2

on the parameter of if statement just put 2 more == like this

(answer === "Michael")