Return operation method, can be written in one line callback && callback ()

 

return DiscountMap[discountType] && DiscountMap[discountType](price)

Guess you like

Origin www.cnblogs.com/pengchenggang/p/11412222.html