+ 2
Where can I see the solution?
Reset account passwords should not be the same as the old password. Task Write a program that takes old and new passwords as inputs and outputs to the console the boolean value (true or false) that shows whether or not they match. Sample Input hl8792m hl8792m Sample Output true
8 Respostas
+ 1
You do realise that the whole point is that you solve it yourself, right?
+ 1
If course, but are there any hints or something...
+ 1
Not too sure how to weite within a function
+ 1
just use comparison operator to print result of old password equals new password ^^
+ 1
It's pretty straightforward. Take two string inputs, compare them and print the result of the comparison.
Try to write the program and if it doesn't work save it in the code playground and post a link here, so people can tell you what's wrong with it.
+ 1
Cheers
0
Thanks a lot !
- 1
Just do like this bro...
var old = prompt("Input the old password")
var new = prompt("Input your new password")
if (old == new) {
console.log(true)
}else{
console.log(false)
}
That's it bro just try it and please thank me laters.
Guddoz!!