The input is an object, but it's value upon coercion to a number differs on each coercion. In a very strict sense, such a simple function could be considered impure. To make it strictly pure in JS, you could add a bunch of code checking types etc.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
In input of function is function that keeps changes its value, then that function can not be considered as pure function, right ?
The input is an object, but it's value upon coercion to a number differs on each coercion. In a very strict sense, such a simple function could be considered impure. To make it strictly pure in JS, you could add a bunch of code checking types etc.