title: Does JavaScript do PEMDAS when doing mathematical calculations?
body: <p>The following line:</p>
  <pre><code>console.log(ship.x + &quot; + &quot; + (4/3) + &quot; * &quot; + ship.r + &quot; * &quot; + Math.cos(ship.a));
  </code></pre>
  <p>returns:</p>
  <pre><code>50 + 1.3333333333333333 * 15 * 6.123233995736766e-17
  </code></pre>
  <p>however when I actually do the math with JavaScript via:</p>
  <pre><code>console.log(ship.x + 4 / 3 * ship.r * Math.cos(ship.a));
  </code></pre>
  <p>it returns the integer value of '50'? How is this possible? The first value in the line is 50 so you would think it would logically be a bigger number once it is ran. I've tried PEMDAS and many other variations and never end up with the value of 50. What exactly is JavaScript doing with the above code? Here's a link to the entire code page: <a href="https://codepen.io/hoyos/pen/vYJqaRw?editors=0010" rel="nofollow noreferrer">https://codepen.io/hoyos/pen/vYJqaRw?editors=0010</a></p>