title: How to resolve the lack of subtraction assignment ( -= ) operator?
body: <p>I would like to use an easing function from website: <a href="https://easings.net/#easeOutBounce" rel="nofollow noreferrer">https://easings.net/#easeOutBounce</a></p>
  <p>The actual code is:</p>
  <pre><code>function easeOutBounce(x: number): number {
  const n1 = 7.5625;
  const d1 = 2.75;
  
  if (x &lt; 1 / d1) {
      return n1 * x * x;
  } else if (x &lt; 2 / d1) {
      return n1 * (x -= 1.5 / d1) * x + 0.75;
  } else if (x &lt; 2.5 / d1) {
      return n1 * (x -= 2.25 / d1) * x + 0.9375;
  } else {
      return n1 * (x -= 2.625 / d1) * x + 0.984375;
  }
  }
  </code></pre>
  <p>Unfortunately I have to replicate this function in a programming language which doesn't have the operator called -= or subtraction assignment. How can I code the function without it?</p>