Created
November 7, 2022 06:21
-
-
Save anartzdev/421e936ab3cb77026830cc788ef7d0d0 to your computer and use it in GitHub Desktop.
Dynamic Access Object - Javascript
This file contains 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
const myPersonalData = { | |
name: 'Anartz', | |
lastname: 'Mugika Ledo', | |
birthday: '10-01-1986', | |
hobbies: [ | |
'hobbies: sports, photography, studying health and technology topics', | |
], | |
blog: 'https://mugan86.medium.com/', | |
portfolio: 'https://anartz-mugika.com/', | |
}; | |
const getDataKeys = ['name', 'lastname', 'portfolio']; | |
getDataKeys.forEach((key) => | |
console.log(`${key.toUpperCase()}: ${myPersonalData[key]}`) | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment