I want to find the production cost % when I enter two amounts...
Here's the image that may explain well...
when I enter purchase price and the Production cost % it gives me the final production price but when I enter purchase price and production price I want prod cost % in return...
How can I do this using javascript ??
Here's the simplest way to solve your question:
let purchasePrice = 500
let productionCost = 10 // In percent (In this case, 10%)
let productionCost = purchasePrice * (productionCost / 100)