Bundle Variables Together
Create a class with grouped data fields (attributes).
We'll cover the following
Sometimes, a single variable can’t represent everything you need. In this lesson, you’ll use classes to bundle variables, like a player’s name, age, and score.
Goal
You’ll aim to:
Create simple custom classes.
Group related data into fields.
Access and print object fields.
Define a class
A class is a blueprint for something like a player or a book in the real world. It helps you group related variables in one place.
Get hands-on with 1400+ tech skills courses.