antony12
-
Posts
10 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by antony12
-
-
Use Wordpress best, easy and fast.
This post has been edited by a member of staff (Duma) because of a violation of the forum rules.
Please keep your posts at 7 words or above.
Per the reason above, please review our SPAM rules. -
Hello and welcome!
So, I recently finished a fairly lengthy programme on inheritance. I was instructed to provide a function toString() { [native code] } function in each class. The issue is that I have methods like getArea and getPerimeter in my subclasses. In my function toString() { [native code] } function for this class, I want function toString() { [native code] } to execute and, for example, output the region of the object that function toString() { [native code] } is invoked on. I just don't understand the syntax... I assumed it would be:
"Area : " + this.getArea()
However, it returns an error. So, in my function toString() { [native code] } class, how would I refer to this *unknown* object?
Thank you very much!
Online Dating
in The Debate Chat
Posted
I mean depend on person, for me its fine