+ 2

Correction of my if else statement

https://code.sololearn.com/WPOGUJGfH839/?ref=app In this code just check the javascript if else there is something wrong with it just run first and continue to last page where you have to enter fields. Ask me if didn't understand my question

11th Aug 2021, 5:38 AM
GOLLAKOTI VENKATA SAI SIVA MANI CHANDU
GOLLAKOTI VENKATA SAI SIVA MANI CHANDU - avatar
4 Respostas
+ 2
if (c.value != "") is correct if (c.value = "!") is wrong Recall that the equality operator is == and the inequality is !=
11th Aug 2021, 6:37 AM
Giorgos
+ 2
In your code you have: if ( c.value = "" ) { ....... } This sets c.value to "" and then evaluates to false because the empty sting "" is a falsy value in JS. What you wanted to write is != instead of =
11th Aug 2021, 6:20 AM
Giorgos
+ 1
When all inputs are filled and when u submit it it again says fill all inputs which was set by me when alert shows automatically the phone number resets input field
11th Aug 2021, 6:29 AM
GOLLAKOTI VENKATA SAI SIVA MANI CHANDU
GOLLAKOTI VENKATA SAI SIVA MANI CHANDU - avatar
+ 1
Can u please just edit it and post here? Again
11th Aug 2021, 6:30 AM
GOLLAKOTI VENKATA SAI SIVA MANI CHANDU
GOLLAKOTI VENKATA SAI SIVA MANI CHANDU - avatar