552 B
Executable File
552 B
Executable File
Dot Access and Method Calls
Dot notation accesses properties and methods on objects.
Property Access
const user = { name: 'Mathias', age: 30 };
console.log(user.name); // 'Mathias'
Method Call
const text = 'hello';
console.log(text.toUpperCase()); // 'HELLO'
In your code:
backendPeriodLabelFormatter.formatToParts(date)
backendPeriodLabelFormatteris an object.formatToPartsis a method.(date)passes the argument.
Python Comparison
Equivalent idea to obj.attr and obj.method(arg).