1 min readNov 15, 2019
Hard to answer your question. Assignment in the constructor is fine for some situations. But sometimes you end up with a new object, that appears to have the data, but it does not have the methods of the class.
I’m having difficulty explaining.
You end up with an object, but the properties are not the actual class properties.
The best thing to try is to create a class method that uses the properties. If you instantiate it in the constructor and the method accesses the properties, you are good. If not, then use the assign.
Glad to communicate more on this.