Created
October 18, 2017 21:22
-
-
Save marsicdev/b6e388367f17733ca8affa1b98c23ae7 to your computer and use it in GitHub Desktop.
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
var school = { | |
name: "BIT", | |
address: "Nemanjina 4", | |
city: "Belgrade", | |
isOpen: true, | |
teachers: ["Marko", "Nenad", "Stanko"], | |
students: ["Pera", "Mika", "Zika"] | |
} | |
var speaker = { | |
name: "Marko", | |
course: "CS/JS", | |
yearOfBirth: 1989, | |
boring: true, | |
school: school, | |
speak: function () { | |
return "Bla Bla"; | |
}, | |
calculateAge: function () { | |
return 2017 - speaker.yearOfBirth; | |
} | |
} | |
console.log(speaker.school); | |
console.log(speaker.speak()); | |
console.log(speaker.calculateAge()); | |
console.log(typeof speaker); | |
console.log(speaker.school.name); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment