Last active
May 23, 2020 15:31
-
-
Save Theo-denBlanken/7c2109c2ce3f727688e7e63af1975d9e to your computer and use it in GitHub Desktop.
Een voorbeeld van een JavaScript object
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 koning = { | |
naam: 'Willem-Alexander der Nederlanden', | |
echtgenote: 'Máxima Zorreguieta', | |
kinderen: ['Amalia', 'Alexia', 'Ariane'], | |
geboortejaar: 1967, | |
url: 'https://imgg.rgcdn.nl/162226349cc546fb9f908c4faaf8bf75/opener/Foto-NOS.jpg', | |
noemKinderen() { | |
let zin = 'Mijn kinderen zijn: '; | |
for (let i=0; i<this.kinderen.length; i++) { | |
zin += this.kinderen[i] + ' '; | |
} | |
return zin; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment