Last active
October 29, 2018 18:03
-
-
Save talha08/329e797d9e59dcb53f0b0d57cd07fd59 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
const student = { | |
firstname: 'Jhon', | |
lastname: 'Snow', | |
ielts_scores: { | |
speaking: 8, | |
listening: 7.5, | |
writing: 8.5, | |
reading: 7.0 | |
} | |
}; | |
const { | |
firstname, | |
lastname, | |
country, | |
ielts_scores:{speaking, listening, writing, reading} | |
} = student; | |
console.log(`${firstname} ${lastname} ${firstname}`) //"Jhon Snow" | |
console.log(` | |
speaking:${speaking}, | |
listening:${listening}, | |
writing:${writing}, | |
reading:${reading} | |
`) | |
//"speaking:8, listening:7.5, writing:8.5, reading:7" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment