Yes, that's true!
I was thinking more along the lines of having the scope reside entirely within Object.defineProperty where I don't believe a block scope would actually work, which is why I used an IIFE.
But this is completely valid, too!
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Yes, that's true!
I was thinking more along the lines of having the scope reside entirely within
Object.defineProperty
where I don't believe a block scope would actually work, which is why I used an IIFE.But this is completely valid, too!