mg2017
04/17/2020, 4:23 PMbattk
04/17/2020, 4:32 PMfile_extension !== null
should render
typeof file_extension === "undefined"
unnecessary. undefined is not equal to nullerictgrubaugh
04/17/2020, 5:02 PMundefined is not a string, it's a primitive valueerictgrubaugh
04/17/2020, 5:02 PMfile_extension to not be there some times, then if (file_extension) should be sufficienterictgrubaugh
04/17/2020, 5:03 PMnull , undefined, "", 0, false, NaN will all evaluate to false in a Boolean context: https://developer.mozilla.org/en-US/docs/Glossary/Falsyerictgrubaugh
04/17/2020, 5:04 PMerictgrubaugh
04/17/2020, 5:04 PMundefined and not the other empty valuesmg2017
04/17/2020, 6:30 PM