Simple JavaScript Mistakes We Make for string

mail@pastecode.io avatar
unknown
javascript
2 years ago
219 B
4
Indexable
Never
 console.log('9' - '5'); // -> 4

 console.log('19' - '13' + '17'); // -> '617'

 console.log('19' - '13' + 17); // -> 23

 console.log('123' < 57); // -> false

 console.log(5 + 6 + '4' + 9 - 4 - 2); // -> 1143