I have this in a project's code, but I dont understand it:
const values = {
value1: 30,
value2: 60
}
let {
value1: red,
value2: blue
} = values;
console.log(red);
In the second part I tought that value1 was being declared as a variable but it seems that is the oposite, red gets 30 (value1) ¿? Why is 'red' receiving value1?