[JavaScript] Easy to understand
I think this strategy is pretty straight forward.\n\njs\nconst subtractProductAndSum = n => {\n  let sum = 0;\n  let prod = 1;\n  while (n > 0) {\n    const mod
I think this strategy is pretty straight forward.\n\n```js\nconst subtractProductAndSum = n => {\n  let sum = 0;\n  let prod = 1;\n  while (n > 0) {\n    const mod = n % 10;\n    sum += mod;\n    prod *= mod;\n    n = Math.floor(n / 10);\n  }\n  return prod - sum;\n};\n```
['JavaScript']