logoalt Hacker News

metabageltoday at 5:28 PM1 replyview on HN

OK, or maybe...

  total = calculateOrderTotal(user.order);
  total = total * user.discount;

Replies

1718627440today at 8:40 PM

Or:

  total = calculateOrderTotal(user.order);
  total *= user.discount;
or:

  return 
         calculateOrderTotal(user.order)
       * user.discount;