Think you've got it?
- Short answer field
Techtonica Coding Challenge
1.Create an object called Theater. The object should have a constructor that takes in 3 parameters: theaterName (a string), capacity (an integer), and city (a string representing what city the theater is in). It should save these parameters as properties on the object.
2.Add a method called getCapacity to Theater. This method should take no parameters and it should return a string as described below.
3.Add a method called sayWelcome to Theater. This method should take in a parameter personName (a string) and it should return the string "Hi <personName>, welcome to <theaterName>, <city>!", where <personName> is the parameter, and theaterName and city are properties of Theater.
4.Write a function theatersInNYC(theaters) that accepts an array of Theater objects as a parameter, and for each Theater object, prints either "<theaterName> is in New York City" if the theater's city property is equal to "New York City" or "<theaterName> is in another city" otherwise.
5.Create three different instances of the Theater class. Hold each object in variables named theaterA, theaterB, and theaterC.