A constructor is a function used as a prototype for an object, and when called, create a new object instance from the prototype.
Used to declare an object, which contains key-value pairs.
The ternary operator is used to execute code based on the result of a binary condition. It takes in a binary condition as input, which makes it similar to an 'if-else' control flow block. It also, however, returns a value, behaving similar to a method.
Create Object using Constructor
Used to create a new object using a constructor.