We’d like our classes to do more than… well, nothing, so we’ll have to add some code between our class Person and end.

You may have noticed in our example back in the first exercise that we started our class definition off with a method called initialize. You can think of initialize as the function that “boots up” each object the class creates.



Go ahead and define an initialize method for your Person class. No need to put anything in the method body just yet.

Take this course for free

Mini Info Outline Icon
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.

Or sign up using:

Already have an account?