Good afternoon. In C#, I create a class, then from this class I create a class variable (or object). And if I work with collections, then I add my new classes to the collection.
class person{
int id;
string name;
int age;
}
person myPerson = new person();
List<person> people = new List<person>();
people.add(myPerson);
As I understand it, in Javascript it happens in a different way. Here they do not like to create classes first, but directly add an object with data directly to the collection.
Tell me how Javascript is used to work with its own data types. What is the approach used?