sajad torkamani

Before

if (product.price > 100 && product.isInStock() && customer.hasLoyaltyCard()) {
    applySpecialDiscount()
}

After

const isEligbleForDiscount = product.price > 100 && product.isInStock() && customer.hasLoyaltyCard()

if (isEligibleForSpecialDiscount) {
    applySpecialDiscount()
}