Comments are vague for the "The This Keyword"


#1

Here is how the second comment reads on "The This Keyword" exercise:

// and down here we just use the method we already made

I think it would be better if the comment read:

//and down here we take the setAge function, created above, and make it a method of the bob object.

I think this is more accurate because the function was just a function until it was placed inside of the bob object.

Maybe I'm nitpicking but I was confused about the term "method" because when I first looked at it, it didn't exist inside of an object.


Replace this line with your code.


#2

Well, in the first comment it does say // here we define our method using "this", before we even introduce bob which would I believe imply 3 things: 1.) the var setAge and this.age is the method, 2.) bob is not introduced with a method 3.) in using the method we already made I should follow the var setAge. Now I can see how actually referring to setAge might make the connection possibly faster. However, overall, it would seem it would come down to preference of the learner or programmer to which comment would make more sense to him or her personally.


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.