6

Focused on debugging Javascript after being asked for help. Original developer narrowed it down to an if statement. It was acting like the if statement was assigning the variable and causing undefined. Tested console.log before evaluation. Tried !== instead of != and same thing. Even swapped undefined and variable so it would try to assign a variable named undefined instead... It took way too long for the both of us to realize the word "let" in front of the variable on the line withing the if statement block... It overwrite the variable the moment it entered the block.... FML.

Comments
Add Comment