DEV Community

Discussion on: Javascript Shorthand Coding Techniques

Collapse
 
tolomei69 profile image
tolomei

I guess 10. should be

checkOut = (quantity, price, discount = 0) => (quantity * price + discount)
Collapse
 
ayekpleclemence profile image
Ayekple Clemence

Thanks

Collapse
 
meg_gutshall profile image
Meg Gutshall

Also logically, wouldn't you want to subtract the discount?