loading...

Discussion on: Daily Challenge #30 - What is the price?

Collapse
alvaromontoro profile image
Alvaro Montoro

JavaScript

const discoverOriginalPrice = (price, discount) => (price*100/(100-discount)).toFixed(2);

My solution is almost the same as Juan Rodríguez's, just using .toFixed(2). Link to live demo on CodePen.