Created
May 17, 2025 17:02
-
-
Save davidystephenson/3e54107b0a7a9f92a1efb29d817911cd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 5. Declare an object named "person" with properties "name", "age", and "city" and set their respective values to | |
// "John", 30, "New York" and hobbies as "reading", "swimming", "traveling". Print the name, age, and city of the person. | |
var person = { | |
name: 'John', | |
age: 30, | |
city: 'New York', | |
hobbies: ['reading', 'swimming', 'traveling'] | |
} | |
console.log(person.name) | |
console.log(person.age) | |
console.log(person.city) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment