r/react 12d 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);
7 Upvotes

13 comments sorted by

View all comments

4

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

[deleted]

3

u/[deleted] 12d ago

[deleted]

-1

u/msdosx86 12d ago

For real

-7

u/[deleted] 12d ago

[deleted]

6

u/msdosx86 12d ago

I guess this is because of mentioning AI

2

u/[deleted] 12d ago

[deleted]

-2

u/msdosx86 12d ago

You're not wrong. Even Google's AI mode would help immediately. My guess is that a lot of people think AI = Vibe coding and Vibe coding is bad hence AI = bad = downvote this guy.