The JavaScript Reflect.get() method is used to retrieve the value of a property from an object. It works similarly to accessing a property using dot notation or bracket notation.
In this chapter, you will learn how to use the Reflect.get() method to access properties from objects and arrays.
The JavaScript Reflect.get() method returns the value of a specified property from an object. If the property is not found on the object, the method searches the prototype chain. If the property still cannot be found, it returns undefined.
Use the following syntax to retrieve a property value from an object:
The Reflect.get() method returns the value of the specified property.
The following examples demonstrate how to use the Reflect.get() method.
In this example, we use the Reflect.get() method to retrieve existing and non-existing properties from an object.
Output:
true true false
In this example, we create an object that inherits from another object and use the Reflect.get() method to retrieve a property from its prototype.
Output:
true
In this example, we use the Reflect.get() method to access values from both an object and an array.
Output:
2 "charry"
| Browser | Version |
|---|---|
| Chrome | 49 |
| Edge | 12 |
| Firefox | 42 |
| Opera | 36 |
We request you to subscribe our newsletter for upcoming updates.

We deliver comprehensive tutorials, interview question-answers, MCQs, study materials on leading programming languages and web technologies like Data Science, MEAN/MERN full stack development, Python, Java, C++, C, HTML, React, Angular, PHP and much more to support your learning and career growth.
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India