Welcome to the Treehouse Community
Looking to learn something new?
what does the "this" do ?
what does the "this" do exactly ? and why do we have to use it in this case ?
Steven Parker216,136 Points
Inside a constructor, "this" refers to the object that is being created.
Since the "base" has already loaded in the values for "X" and "Y", the object can be passed to the "Map" function "onMap" to determine if the coordinates are valid.
ok As You said: Inside a constructor, "this" refers to the object that is being created, so in that case what is the object that is created? ...MapLocation?
forget Python for that and answer the question because I have the same question, if I don't want to write the keyword "this", what object I would write