I have been searching for the name of this structure inside this Typescript class. I know it is very similar to a dictionary in python but wanted to find more details on this and why it is working this way. Is it okay to use this like this or is it best to define a separate class and use an instance of that inside myClass? Many Thanks
class myClass { whatAmI = { title: "This Title", age: 29, date: "26/01/2021" } } let x = new myClass(); console.log(x.whatAmI.title);
1.4m articles
1.4m replys
5 comments
56.9k users