skip to Main Content

Javascript – how to get nested object value

I'm stuck on something simple. The code below will give "3" as the result...however. I want to get three without having to explicitly know "New York"? <!DOCTYPE html> <html> <body> <h2>JavaScript Objects</h2> <p>Display object properties:</p> <p id="demo"></p> <script> const person…

VIEW QUESTION
Back To Top
Search