i just wanted to double check if the code i wrote is right.i have to turn these conditional expression into if/else statements.
1 2 3 4 5 6 7 8
|
total += count == 1 ? sales : count * sales
if(count==1)
total=total+sales;
else
total=total+count*sales;
|
Last edited on
The both code snips correspond each other.