Object destructuring with function parameters

PHOTO EMBED

Wed Mar 10 2021 23:48:03 GMT+0000 (Coordinated Universal Time)

Saved by @_abrahamrosales #javascript

const languages = {
  english: "50%",
  spanish: "100%",
  japanese: "what a weeb lol",
};

function getLanguages({ english, spanish, japanese, chinese = "0%" }) {
  console.log(`
    ${english}
    ${spanish}
    ${japanese}
    ${chinese}
    `);
}

getLanguages(languages);
content_copyCOPY

From me