Object Methods in JavaScript

ObjectsFunctions

Objects can do things too! We can put functions inside objects (called methods) so the object can "act". There are also built-in tools from the Object class to work with properties.

Let’s learn the most useful ones with everyday examples – like a robot that can greet you!

Methods – Functions Inside Objects

A method is just a property that is a function. Use 'this' to refer to the object itself.

Shorter way with arrow? Careful – arrow functions don’t have their own 'this'!

Object.keys, values, entries

These give you arrays of keys, values, or both.

Checking Properties

Freezing Objects

Make an object unchangeable with Object.freeze()

Quick Fun Quiz

We have reviewed and checked the materials, but errors may still occur. The content is provided for educational purposes only, so use it at your own responsibility and verify with other sources if needed.

✨ Ask Lara — your AI study partner

Unlock personalized learning support. Lara can explain lessons, summarize topics, and answer your study questions — available from the Go plan and above.


Lara helps you learn faster — exclusive to ReadyTools Go, Plus, and Max members.

Track Your Progress 🚀

Learn more easily by tracking your progress completely for free.