0
Comparison Operators
I’m trying to solve the code challenge Change Your Password in javascript. I can’t figure out what is wrong with my code. var oldPass = readLine() var newPass = readLine() console.log(oldPass == newPass); Based on the lesson (comparison operator equality) this seems correct. Why is it not?
4 Antworten
+ 1
I tried :
console.log(oldPass == newPass )
it worked.
what error did you get?
0
i get false for all 5 tests but 3 of them should be true
0
could you share the whole code, create a private code and send me the link.
0
the issue is in ++
function readLine() {
return inputString[currentLine ];
}
change it to
function readLine() {
return inputString[currentLine++];
}