DEV Community

Discussion on: Is everything in JavaScript an Object?

Collapse
 
baenencalin profile image
Calin Baenen • Edited

To explain how I think about an object, this is what I think of an object as:

type Person struct {
  name [2]string;
  age float32;
} // "Person" type.

p := Person {name: {"Calin", "Baenen"}, age: 14.8333}; // Person object.
Enter fullscreen mode Exit fullscreen mode