JSOperators

-

Subtraction operator

See more on MDN

Subtraction behaves in the same way as the addition operator.

console.log(1 - 1); // 0

However, you can't subtract a number from a string.

console.log("test" - 1); // NaN