"JavaScript Basics (Retired)" was retired on March 27, 2020.
Bummer! This is just a preview. You need to be signed in with an account to view the entire instruction.
Well done!
You have completed Practice Getters and Setters in JavaScript!
You have completed Practice Getters and Setters in JavaScript!
Instruction
Creating a Setter Method Solution
Task 1 Solution
Setter methods are used when you want to add logic while setting a property. A circle's area and circumference are dependent on its radius. But if the radius of a Circle object changes, we would have to manually update it's area and circumfrence properties as well. By using a setter method for the radius, we can also update the Circle's object's area and circumference pro...