Accessing Properties
A property of an object is some piece of named data it contains. These are accessed with dot
operator applied to an object alternative to the dot operator is the array [ ] operator.
Syntax: – object_name.property_name
Ex:-
Accessing Properties
Accessing Methods
Object members that are functions are called methods. These are accessed with dot operator applied
to an object alternative to the dot, the operator is the array [ ] operator.
Syntax: – object_name.Method_name( );
Ex:-
Adding Properties/Methods
Syntax:-
Object_name.Property_name = value;
Object_name[„Property_name‟] = value;
Deleting Properties
Delete operator is used to delete instance properties.
Syntax:- delete object_name.property_name
Ex: – delete fees.Rahul
After removal with delete operator, the property has the undefined value.
- AWS Error: Access denied by EC2 Instance Connect - December 4, 2023
- How to get Blackduck Trial version? - December 3, 2023
- PHP ionCube Error: cannot be decoded by this version of the ionCube Loader - December 2, 2023