I am inside a for loop trying to add up a number. The code is working fine, but I was asking myself if there might be shorter form for the following line:
price = ve.select ? price + ve.price : price;
if ve.select is true, the price is increased by ve.price, if its false, then price stays.
I am searching for something similar like this line (I know this code snippet does not work):
price = ve.select ? price + ve.price;