pull/59/head
Asabeneh 5 years ago
parent 2f06722dfb
commit c51058b3de

@ -508,13 +508,11 @@ class Person {
let formattedSkills = skills ? `He knows ${skills}` : '' let formattedSkills = skills ? `He knows ${skills}` : ''
let info = `${fullName} is ${this.age}. He lives ${this.city}, ${this.country}. ${formattedSkills}` let info = `${fullName} is ${this.age}. He lives ${this.city}, ${this.country}. ${formattedSkills}`
console.log(this)
return info return info
} }
static favoriteSkill() { static favoriteSkill() {
const skills = ['HTML', 'CSS', 'JS', 'React', 'Python', 'Node'] const skills = ['HTML', 'CSS', 'JS', 'React', 'Python', 'Node']
const index = Math.floor(Math.random() * skills.length) const index = Math.floor(Math.random() * skills.length)
console.log('hi')
return skills[index] return skills[index]
} }
static showDateTime() { static showDateTime() {
@ -609,7 +607,6 @@ class Student extends Person {
let pronoun = this.gender == 'Male' ? 'He' : 'She' let pronoun = this.gender == 'Male' ? 'He' : 'She'
let info = `${fullName} is ${this.age}. ${pronoun} lives in ${this.city}, ${this.country}. ${formattedSkills}` let info = `${fullName} is ${this.age}. ${pronoun} lives in ${this.city}, ${this.country}. ${formattedSkills}`
console.log(this)
return info return info
} }
} }

Loading…
Cancel
Save