0
PHP WHAT DOES -> MEAN
What does the operator -> mean in php in simple words. Can you give me an example of what it means PLEASE
4 Respuestas
+ 3
JS uses dot (.) notation to access methods and properties.
for ex-
var obj = new MyObject();
obj.thisProperty = 'Fred'; // setting a property of obj object
obj.getProperty(); // calling method of obj object
0
is used in object scope to access methods and properties of an object. It’s meaning is to say that what is on the right of the operator is a member of the object instantiated into the variable on the left side of the operator.
0
example:
// Create a new instance of MyObject into $obj
$obj = new MyObject();
// Set a property in the $obj object called thisProperty
$obj->thisProperty = 'Fred';
// Call a method of the $obj object named getProperty
$obj->getProperty();
0
What would it be in JavaScript because I have used JavaScript a lot and I have never once seen it in there. Does JavaScript have an alternative to it or what.