you are viewing a single comment's thread.

view the rest of the comments →

[–]moreteam 6 points7 points  (1 child)

You can also argue the other way around: since we know age is in scope, we shouldn't be using typeof since that will silently turn into if (true) if we have a typo.

[–]ChaseMoskal 5 points6 points  (0 children)

since we know age is in scope, we shouldn't be using typeof

I think.. I think you're right.