+ 1

Any one help??

Reset account passwords should not be the same as the old password. 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 function main() { var oldPass = redline(); Var newPass = redline(); //Your code goes here }

13th Feb 2021, 9:38 AM
NIKHIL SONAWANE
NIKHIL SONAWANE - avatar
23 odpowiedzi
+ 3
Hi! You can show us your attempt? Put your code to code playground section and paste link here
13th Feb 2021, 9:56 AM
Yaroslav Vernigora
Yaroslav Vernigora - avatar
+ 2
Huhuhu please
24th Jul 2021, 7:38 AM
Analyn Anadon
Analyn Anadon - avatar
+ 2
Thank you ☺️ hehe but ,it's done
22nd Aug 2021, 2:49 AM
Analyn Anadon
Analyn Anadon - avatar
+ 1
You need to add below if statement to log true and false in console. If(oldPass===newPass) { console.log(true);} else { console.log(false);}
30th Apr 2021, 9:19 PM
Rahul Tiwari
+ 1
Some one can help this to mr
24th Jul 2021, 7:38 AM
Analyn Anadon
Analyn Anadon - avatar
+ 1
hi Analyn, what was the question, did you figure it out?
29th Jul 2021, 7:37 AM
Kyeol Williams
Kyeol Williams - avatar
+ 1
function main() { var oldPass = readLine(); var newPass = readLine(); // Your code goes here console.log(oldPass == newPass) } //think in an easy way . Hope that will work Perfectly Chill.
21st Aug 2021, 11:45 AM
MD RAKIBUL HASSAN NAYON
MD RAKIBUL HASSAN NAYON - avatar
+ 1
What's wrong with: function main() { var oldPass = "hl8792m"; var newPass = "hl8792m"; console.log(oldPass==newPass); }
18th Nov 2021, 11:12 AM
Rapha
0
and what's your doubt here?
13th Feb 2021, 9:39 AM
NaSaPaKri
NaSaPaKri - avatar
0
Have to write program that takes old and new passwords as inputs and outputs to the console the boolean value and output should be true
13th Feb 2021, 9:43 AM
NIKHIL SONAWANE
NIKHIL SONAWANE - avatar
0
use a if condition...
13th Feb 2021, 9:47 AM
NaSaPaKri
NaSaPaKri - avatar
0
Don't know how to use I tried
13th Feb 2021, 9:53 AM
NIKHIL SONAWANE
NIKHIL SONAWANE - avatar
0
you should use the condition operator as suggested above
13th Feb 2021, 10:02 AM
Yaroslav Vernigora
Yaroslav Vernigora - avatar
0
Output should be true so I have to use == or = if am wrong please correct me
13th Feb 2021, 10:05 AM
NIKHIL SONAWANE
NIKHIL SONAWANE - avatar
0
= this is the assignment operator (variable value) == this is the comparison operator (in your case). be careful and compare values of the same type. js likes to implicitly convert values of different types when comparing
13th Feb 2021, 10:08 AM
Yaroslav Vernigora
Yaroslav Vernigora - avatar
0
Am done I used all the operator but still not getting output please if you know the answer explain me
13th Feb 2021, 10:23 AM
NIKHIL SONAWANE
NIKHIL SONAWANE - avatar
0
I told you how to do it: create a file in the encoding section { }. select the js programming language. insert or write all your code there. not a piece of code, but everything you need. save this file there. make it public. and send the link here in the conversation. it is very difficult to help in words
13th Feb 2021, 10:28 AM
Yaroslav Vernigora
Yaroslav Vernigora - avatar
13th Feb 2021, 10:28 AM
Yaroslav Vernigora
Yaroslav Vernigora - avatar
0
Did it work?
25th May 2021, 11:31 PM
uchenna onwuliri
uchenna onwuliri - avatar
0
congrats
22nd Aug 2021, 3:13 AM
Kyeol Williams
Kyeol Williams - avatar