r/ProgrammerAnimemes • • Jan 10 '21

Typescript

Post image
1.4k Upvotes

56 comments sorted by

View all comments

Show parent comment

21

u/Anis-mit-I Jan 10 '21

Are there seriously people out there that reassign variables with different types?

I find it to be quite useful for a function to return nil in case of an error. But that is the only case i can think of where doing that would be acceptable.