Codington
0 of 8 problems solved • 0%
Use in a course

Exercise prompt

Rename a Destructured Property

A colon in an object destructuring pattern gives a property value a different variable name.

Example

const product = { name: "Pen" }; const { name: productName } = product;

Your task

Extract name from student into a variable named studentName. Use that variable to display Student: Leo.