In introduction to objects, in the 17th lesson we use susan.setAge=setAge or

Why do we use this code? or What does this do?


It assigns the setAge function to the setAge property of susan or bob which makes setAge a method of these objects. Could you provide more context?


Yup u sed exactly what i needed. Thanks.