you defining obj, but then you use state. in non-strict mode this leads to the creation of a global variable, in strict mode this leads to an error.
After that you use obj again, so the new value saved in state in state isn't even used.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.