The object Band now has two properties, "name" and "genre." With this, it is possible to create an instance of the object Band, and pass it two parameters ("n" and "g"), which are then stored as object properties. Note my use of the "this" keyword, which provides a convenient way to access variables (and functions) which are "local" to the object.
A couple of interesting things here: first, the object method whoRules() is actually defined outside the object constructor block, though it references object properties using the "this" keyword. Second, just as object properties are defined using "this," object methods need to be defined in the same manner. Witness my addition of…