Try changing console.log(country) to console.log(people.country);.
country isn’t defined where you call console.log. country is only defined within the people object.
1
solved Uncaught syntax error unexpected identifier JavaScript objects [closed]