Skip to content
Snippets Groups Projects
Select Git revision
  • 60d83c8e5081cb4f45ae279f8e2013ffaebbb243
  • main default protected
2 results

objectDestructuring.js

Blame
  • Forked from SOFT Core / SOFT 260 / JavaScript Practice
    Source project has a limited visibility.
    objectDestructuring.js 480 B
    export function summarize(record) {
      // INSTRUCTIONS: Write a single assignment statement to extract `record.type`
      // and `record.name` to the variables `type` and `name` so that the return
      // statement below can use them.
      //
      // Resources:
      // <https://javascript.info/destructuring-assignment#object-destructuring>
      // <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment>
      return `Record of type ${type}: ${name}`;
    }