// https://[Log in to view URL]
const registro = {id: 1 , name: "Juan" , precio: 60};
const nuevo = {id: 99 , precio: 99};
const mezcla = {...registro, ...nuevo, id: registro.id};
console.log(mezcla);
const {precio, name, stock} = mezcla;
const disponible = (stock ?? 0) > 0 ? `Stock total ${stock}` : `No tenemos stock`;
console.log(`Nombre ${name} cuesta ${precio} tenemos: ${stock ?? 0} `);
console.log(`Nombre ${name} cuesta ${precio} tenemos: ${disponible} `);
// ?? → “solo si no existe” (null o undefined).
// || → “si es falso de cualquier tipo”.
To embed this project on your website, copy the following code and paste it into your website's HTML: