+ 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

5th Jul 2021, 12:52 AM
Andres
8 odpowiedzi
+ 1
You do realise that the whole point is that you solve it yourself, right?
5th Jul 2021, 12:53 AM
Simon Sauter
Simon Sauter - avatar
+ 1
If course, but are there any hints or something...
5th Jul 2021, 12:56 AM
Andres
+ 1
Not too sure how to weite within a function
5th Jul 2021, 12:57 AM
Andres
+ 1
just use comparison operator to print result of old password equals new password ^^
5th Jul 2021, 12:58 AM
visph
visph - avatar
+ 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.
5th Jul 2021, 1:01 AM
Simon Sauter
Simon Sauter - avatar
+ 1
Cheers
5th Jul 2021, 1:07 AM
Andres
0
Thanks a lot !
19th Jul 2021, 11:29 AM
Andres
- 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!!
6th Jul 2021, 2:45 PM
Juma Chaje
Juma Chaje - avatar