I have the following JavaScript:
const { inverseDirection } = this.props;
if inverseDirection is false, I need the following:
const dashOffset =
dashArray - (dashArray * this.state.percentProgress) / 100;
if inverseDirection is true, I need the following:
const dashOffset =
dashArray + (dashArray * this.state.percentProgress) / 100;
What is the right way to elegantly code this without duplication the entire line?