Why else block at the end of js not working | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
14th Jun 2020, 1:51 PM
Yash
Yash - avatar
3 Answers
+ 2
Ron Because you assigned String value to boolean variable and in your if condition you are checking boolean value true or false to solve this problem either you can assign boolean = false or boolean = true Or you can change your if Condition like this: if(check_passwrd() == "true" && check_name() == "true")
14th Jun 2020, 3:07 PM
A͢J
A͢J - avatar
+ 2
Ron Welcome and keep learning ✅
14th Jun 2020, 5:07 PM
A͢J
A͢J - avatar
+ 1
Thanks @AJAnant it works after that
14th Jun 2020, 4:45 PM
Yash
Yash - avatar