Consider following snippet:
 var dog = { species: "greyhound", }; 
How can you add properties to a dog object? Select all correct options.
Explanation
There is three ways in JavaScript you can access the dog object: objectName.property // dog weight objectName["property"] // dog["weight"] objectName[expression] // x = "weight"; dog[x]

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback