JSFiddle - React, Tailwind, and code Playground
by Bart Kalisz
JavaScript
let x = { a: 1 };
try {
x = { ...x, b: 2 };
throw new Error("whoops");
} catch (ex) {
x = { ...x, c: 3 };
}
console.log(x);
by Bart Kalisz
let x = { a: 1 };
try {
x = { ...x, b: 2 };
throw new Error("whoops");
} catch (ex) {
x = { ...x, c: 3 };
}
console.log(x);