Access Object Properties in JavaScript

JavaScript·2 min read·Jan 1, 2026

The value of object properties can be referenced and accessed using three different syntaxes based on the required use case.

The dot notation

To access and use the value of a property using its key, you can use the dot notation:

object.keyobject.key.nestedKey

Note: When working with nested keys, if any of the intermediate keys evaluates to null or undefined, JavaScript will throw a TypeError.

Example

Let's consider this object:

const landmark = {  name: 'Place du Trocadero',  type: 'View point',  location: {    address: 'Place du Trocadéro et du 11 Novembre, 75016 Paris, France',    coordinates: {      latitude: 48.8628402,      longitude: 2.287142

Unlock the program 🚀

Pay once, own it forever.

€79

30-day money-back guarantee

  • 13 modules
  • 113 lessons with full-code examples
  • 29 projects with commented solutions
  • All future lesson and project updates
  • Lifetime access

By submitting this form, you agree to the Terms & Conditions and Privacy Policy.