Intermediate · Lesson 11 of 12

Objects & classes

Objects group data with related behavior. A class describes how to create those objects. Model a small concept first, such as a learner with a name and a greeting, and keep responsibilities clear.

Try it for yourself

Run the example, then change one thing and see what happens.

13px
main.jsYour ideas, in code.
Loading your editor…
Run your code to see the output here.
Ready to buildUTF-85 lines

Expected output

Hello, Alex

Make it your own

Create a second learner with a different name.

A quick check

Which habit helps when learning objects & classes?

PreviousNext lesson