variable user is using for both string and object type different values. these situation is called "ninja code" bu author :)
"Add a new variable only when absolutely necessary.
Instead, reuse existing names. Just write new values into them."
https://javascript.info/ninja-code