In Actionscript 3, what is the difference between the "in" operator and the "hasOwnProperty" method?

Viewed 2532

The "in" operator and "hasOwnProperty" methods appear to be interchangeable, but I'm wondering if one is checking for inherited properties or something and the other isn't or something like that. I'm especially interested in the case of using it with a Dictionary, but I doubt that is different from other uses.

"hasOwnProperty" is described in the official docs here and "in" is described here, but if there is a difference, I didn't find it very clear.

2 Answers
Related