• Yes - in JavaScript, the only real difference between executing a method call and a normal function is what this is set to.

    So, if you define the variable ph in a function, it just stays in that function - but it's nothing to do with the class at all. To actually access the class, you have to explicitly use this..

About

Avatar for Gordon @Gordon started