text: Q:
  
  Object initialization - why are object attributes initialized with " : " not " = "
  
  Been going through Angular tutorials and realized that : is used for type declarations, while = is used for value assignment. Looking at the following code 
  export class HeroesComponent implements OnInit {
    hero: Hero = {
      id: 1,
      name: 'Windstorm'
    }
  
  I don't understand why id and name are using : as opposed to = since the type was already declared and we are assigning a value to the attributes of hero. 
  export class HeroesComponent implements OnInit {
    hero: Hero = {
      id = 1,
      name = 'Windstorm'
    }
  
  Above is code that I would expect to work but is incorrect.
  
  A:
  
  Objects can be initialized using different methods in JavaScript. One method you are probably more familiar with is by first creating an instance of an object and assign properties through the constructors, getters and setters, or by directly mutating the object property
  // Creates a hero object with no properties
  let hero = new Hero();
  
  // Creates a hero object with defined properties
  let hero = new Hero(1, 'Windstorm');
  
  // Creates a hero object then sets the object property
  let hero = new Hero();
  hero.id = 1;
  hero.name = 'Windstorm';
  
  While these methods of creating objects in JavaScript are valid, you will most often see developers use Object Literals, which is a list of name-value pairs, separated by commas. You may have noticed, but JSON adopts the same syntax that Object Literals use, with one difference in being language-independent (Object Literals are unique to JavaScript). To extend my explanation a bit, you can assign any data type to object literal property values: it can be an array, a string, an integer, ANOTHER OBJECT LITERAL, etc. all at the simple press of the ":" on your keyboard. 
  Hopefully I was able to help, best of luck!
  
  