0
Whatâs missing here??
4 Answers
+ 1
u sure that ternary operator needs an if? đ
+ 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.
+ 1
Problem solved, Thank you guys đ
0
It was added to avoid negative values, the result is same after commenting that if part đ