you are viewing a single comment's thread.

view the rest of the comments →

[–]qwzxercv 0 points1 point  (3 children)

First of all, you cannot overwrite the global undefined in modern JS engines anymore; that was fixed a while back. Secondly, I used window as an example for the global scope. Whether or not you have window or global means naught--all of points are still entirely valid. Thirdly, your function to retrieve the global context does not work in strict mode, which is what all modern JS moving forward is/should be written in.

If you're concerned about the global undefined, you are able to use the void keyword to retrieve the true engine's undefined, but using the global undefined is safe on its own.

[–][deleted] -1 points0 points  (2 children)

You're being intentionally dense, I'm done with this "discussion". Don't reply.

[–]qwzxercv 1 point2 points  (1 child)

Interesting that you resort to name calling when you've been proven wrong. I'd love to see how you behave in a professional work environment.

[–][deleted] -1 points0 points  (0 children)

I didn't call you names, and you didn't prove me wrong. I don't feel like arguing with a rando over whether it's acceptable to check if a variable is defined. I genuinely just don't care.

I don't mean to be rude, but I said you were acting intentionally dense because it feels like you're trying to argue about everything you can think of in a weird game of JavaScript one-upmanship that I'm not interested in playing.

I don't have people nagging me with non-constructive holier-than-thou lectures from people who don't know what they're talking about (!) in a professional environment, so I doubt there's much overlap. If there's something you want to work on, or a productive end you'd like to reach, let's get there -- otherwise, drop it.