0% found this document useful (0 votes)
1 views3 pages

Javascript Objects

The document provides a comprehensive list of JavaScript Object methods categorized into five sections: Creating Objects, Reading Object Properties, Checking Properties & Prototypes, Controlling Object Mutability, and Prototype Manipulation. Each method is accompanied by a brief description of its functionality. Additionally, there is a quick summary by use case for easy reference.

Uploaded by

githiyonm4912
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views3 pages

Javascript Objects

The document provides a comprehensive list of JavaScript Object methods categorized into five sections: Creating Objects, Reading Object Properties, Checking Properties & Prototypes, Controlling Object Mutability, and Prototype Manipulation. Each method is accompanied by a brief description of its functionality. Additionally, there is a quick summary by use case for easy reference.

Uploaded by

githiyonm4912
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

✍️ List of all Object Methods 🚀

Created by: Neeraj | LinkedIn: neeraj-kumar1904 💼 | X: @_19_neeraj 🐦 | GitHub:


Neeraj05042001 🐙 |

🔹 1. Creating Objects
Method Description

[Link](proto[, propertiesObject]) Creates a new object with the given prototype.

Copies properties from source to target (shallow


[Link](target, ...sources)
copy).

Converts key-value pairs (like from Map ) into an


[Link](entries)
object.

[Link](obj, prop,
Adds or modifies a single property.
descriptor)

[Link](obj, props) Adds or modifies multiple properties.

🔹 2. Reading Object Properties


Method Description

[Link](obj) Returns an array of property names (strings only).

[Link](obj) Returns an array of property values.

[Link](obj) Returns an array of [key, value] pairs.

Returns all own property names, including non-


[Link](obj)
enumerables.

[Link](obj) Returns symbol properties only.

[Link](obj,
Returns property descriptor of a property.
prop)

[Link](obj) Returns all property descriptors of an object.


🔹 3. Checking Properties & Prototypes
Method Description

[Link](obj, prop) ✅ (ES2022) Safer alternative to hasOwnProperty() .

[Link](prop) Checks if property exists directly on the object.

Checks value equality (better than === for edge


[Link](a, b)
cases like NaN ).

[Link](proto) Checks if object exists in the prototype chain.

Object instanceof (operator) Checks constructor match in prototype chain.

🔹 4. Controlling Object Mutability


Method Description

[Link](obj) Prevents new properties from being added.

[Link](obj) Checks if object is extensible.

[Link](obj) Prevents adding/removing properties, but values can change.

[Link](obj) Checks if object is sealed.

[Link](obj) Makes object fully immutable.

[Link](obj) Checks if object is frozen.

🔹 5. Prototype Manipulation
Method Description

[Link](obj) Returns the prototype of the object.

[Link](obj, Sets the prototype (not recommended for


prototype) performance).

🧠 Bonus: Prototype Methods (Instance methods)


These are available on objects through their prototype:
Method Description

[Link](prop) Checks for own (not inherited) properties.

[Link]() Returns string representation.

[Link]() Returns primitive value of an object.

🧾 Quick Summary by Use Case:


Use Case Common Methods

🔧 Create/Clone Objects create , assign , fromEntries

📋 Read Properties keys , values , entries

🔍 Check Properties hasOwn , hasOwnProperty , is

🔒 Lock/Freeze Objects freeze , seal , preventExtensions

🧬 Prototype Handling getPrototypeOf , setPrototypeOf

⚡Keep Coding⚡

You might also like