Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About Wirral

  • Rank
  1. The chapter begins with a longhand method of creating the star object: var star = {}; star["Polaris"] = new Object; star["Mizar"] = new Object; star["Aldebaran"] = new Object; star["Rigel"] = new Object; star["Castor"] = new Object; star["Albireo"] = new Object; star["Acrux"] = new Object; star["Gemma"] = new Object; star["Procyon"] = new Object; star["Sirius"] = new Object; star["Rigil Kentaurus"] = new Object; star["Deneb"] = new Object; star["Vega"] = new Object; star["Altair"] = new Object; star["Polaris"].constellation = "Ursa Minor"; star["Mizar"].constellation = "Ursa Major"; star["
  2. Deirdre's Dad, thankyou for that highly illuminating answer. I think I now understand the distinction between star (lowercase) and Star (uppercase). The penny dropped as I read your use of the word 'type'. Perhaps the author avoided the term in case his readers were unfamiliar with it. He does briefly mention prototypes. For interest, I'll type the paragraph: The creation of a class-like interface in this section used the constructor pattern. The constructor pattern is helpful but results in multiple instances of the same method being created each time the object is initiated. A better, but mo
  3. I’m working my way through Javascript Step by Step (Steve Suehring, Microsoft Press) and I’m having difficulty understanding the way the words ‘object’ and ‘property’ are used in the book. In this post I will put verbatim extracts from the book in blue. Things start off simply enough: You can create an object in Javascript in two ways: * Using the new keyword, as shown here: var star = now Object; * Using curly braces, as shown here: var star = {}; The author explains there is no concept of classes in Javascript, but shows how to create objects using pseudo-class constructors: var star
  4. My name is Chris, I'm from Wirral in UK. I have a background in mainframe technologies and Visual Basic. I am teaching myself web languages (Javascript at the moment) and I have joined the forum to get some help with these. My main interests apart from computers are natural history and Creation science.
  • Create New...