I store some parameters client-side in HTML and then need to compare them as integers. Unfortunately I have come across a serious bug that I cannot explain. The bug seems to
parseInt
console.log(Number('2') > Number('10')); console.log( ('2'/1) > ('10'/1) ); var item = { id: 998 }, id = '998'; var isEqual = (item.id.toString() === id.toString()); isEqual;