The output of console.log(’10’ – 5) is 5.
- Here, javascript implicitly converts the string ’10’ to a number because the ‘-‘ operator only works with numbers. This process is called as type coercion.
- The string ’10’ is coerced into the number 10, and then the subtraction 10 – 5 is performed, which results in 5.