Maybe msg.delay was 2600000 to start with. So you get to the if with d == 260. 260/60 is 4.333333
parseint is a function. Not a type. You have to call it whenever you need it.
The docu says: The parseInt() function parses a string argument and returns an integer.
There's an additional note:
Note: JavaScript does not have the distinction of "floating point numbers" and "integers" on the language level. parseInt() and parseFloat() only differ in their parsing behavior, but not necessarily their return values. For example, parseInt("42") and parseFloat("42") would return the same value: a Number 42.
Thus you're a lucky person that JavaScript is really forgiving & parseInt(d / 10000) works at all. Behind the scenes, it's doing several (!) type conversions to process your request:
Pseudo code:
d => cast to number
calc d/10000 => result, typeof number
result => cast to string
perform parseInt(result) => d, typeof number
d may look like an integer, yet as Javascript has no integer type, it's still of type number.
Thus d/60 is a division of type number ... creating a result of type number.
Sure it does.
Being a bit picky here, it's yet quite 'wrong'. d is not a string, it's already of type number.
To round to an integer-like value, Math.round() or Math.floor() are your friends here...