What is a sub-object? Provide an example.

What will be an ideal response?

The value of a property can be another object, which is known as asub-object. For instance, the following code creates an object namedorderwith a sub-object namedaddress: var order = {    orderNumber: "F5987",    address: {       street: "1 Main St",       city:"Farmington",
       state: "NY",       zip: "14425"    } };The main object, with the name order, has two properties: orderNumber and address. Theaddressproperty is itself a sub-object, and has four properties of its own:street, city,state, andzip.

Computer Science & Information Technology

You might also like to view...

The minimum hard drive storage for a Windows 8.1 64-bit installation is ________

a. 10 GB b. 20 GB c. 40 GB d. 80 GB

Computer Science & Information Technology

Which of the following is a very popular query language?

A) HTML B) Java C) SQL D) Visual Basic E) XML

Computer Science & Information Technology