To rename a destructured variable in JavaScript, use a colon to provide the new name.
let { original: newName } = data;
Hat tip to Wes Bos' blog.
To rename a destructured variable in JavaScript, use a colon to provide the new name.
let { original: newName } = data;
Hat tip to Wes Bos' blog.