I wrote this code for the user to guess a password exactly 4 times but I am not able to compare the input with the pin, is the way I have compared here wrong? can I not compare the number directly? like
if (input !== 0704)
is it wrong if I'm writing the number directly like this? it works fine if I replace the number with a string.
let pin = 0704;
let count = 0;
for (i=1; i<=4; i++) {
let input = prompt('please make a guess');
if (input !== 0704 ) {
console.log('Sorry that was wrong');
count++;
}
else {
console.log('That was correct!')
break;
}
}