13th Dec 2022, 4:27 PM
Dr AGB Anuradha
Dr AGB Anuradha - avatar
4 Answers
+ 1
u sure that ternary operator needs an if? 🙂
13th Dec 2022, 6:05 PM
arturop200
arturop200 - avatar
+ 1
I have review your code, there are two issues here with your js. Remove 'if' from both conditions and end those lines with ';' . (adults<0) ? "0" : "adults"; (children<0) ? "0" : "children"; hope this will help you to understand the problem. Thank you.
14th Dec 2022, 12:32 PM
Affan Ali
Affan Ali - avatar
+ 1
Problem solved, Thank you guys 😍
14th Dec 2022, 5:14 PM
Dr AGB Anuradha
Dr AGB Anuradha - avatar
0
It was added to avoid negative values, the result is same after commenting that if part 🙃
14th Dec 2022, 10:22 AM
Dr AGB Anuradha
Dr AGB Anuradha - avatar