CodeSOD: Undefined Variable
The Daily WTF
SEPTEMBER 12, 2022
if ( typeof loadingText "undefined" ) { var loadingText = window.Resources.Messages.Loading; } … }. Which highlights why this code is pointless: of course loadingText is undefined , we literally define it on the next line. var declared variables automatically get "hoisted"- they're always scoped to the function.
Let's personalize your content