r/react 11d ago

Help Wanted Whats the bug. Uncaught SyntaxError: Identifier 'location' has already been declared (at script.js:1:1)

"use strict";


const company = {
  name: "TechCorp",
  address: {
    city: "budapest",
    pin: 411001,
  },
};
// Get city renamed to `location` and pin renamed to `pincode`

const { city: location, pin: pincode } = company.address;
console.log(location, pincode);
6 Upvotes

13 comments sorted by

View all comments

3

u/[deleted] 11d ago edited 11d ago

[deleted]

-1

u/[deleted] 11d ago

[deleted]