DEV Community

Discussion on: February 17th, 2022: What did you learn this week?

Collapse
 
ryannerd profile image
Ryan Jentzsch

This is embarrassing but I'll share anyway. I've been developing software for over 25 years. I spent 3 hours today trying to figure out why in my react app that I assigning the variable document to a File object and document kept showing as undefined. Well, friends document is a reserved word in JS (at least that's how Babel seems to be treating it under the hood). But instead of throwing errors that I did something stupid it failed silently and just assigned undefined. Very frustrating.