Destructuring Mixed Content
محتوى الدرس
main.js
/*
Destructuring
- Object
- Array
- Parameter
*/
const user = {
username: 'Osama',
city: 'Cairo',
skills: {
html: '80%',
css: '85%',
js: {
frameone: 'Vuejs',
frametwo: 'Reactjs',
framethree: 'Angularjs'
}
}
};
const {username, city, skills: {html, css, js: {frameone: one, frametwo: two, framethree: three}}} = user;
console.log(`My Name Is ${username}, And I Live in ${city}.`);
console.log(`My Html Skill Progress Is: ${html}, and CSS is ${css}`);
console.log(`I Have Knowledge in Js Frameworks Like ${one}, ${two}, ${three}`);