+ 5

Please why is the condition always returning true

https://code.sololearn.com/WspjQ6tvcm7i/?ref=app

24th Feb 2018, 3:14 AM
Sammy
Sammy - avatar
4 Respostas
+ 6
This is how it should be coded. 'Yes' being non-zero is true. if(goat=='yes'||goat=='Yes'){
24th Feb 2018, 3:57 AM
John Wells
John Wells - avatar
+ 4
thanks a lot
24th Feb 2018, 4:30 AM
Sammy
Sammy - avatar
+ 3
I appreciate
24th Feb 2018, 4:36 AM
Sammy
Sammy - avatar
0
Cool
26th Mar 2019, 4:07 AM
Momoh Aloaye Michael
Momoh Aloaye Michael - avatar