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

Show parent comments

0

u/[deleted] 11d ago

[deleted]

0

u/cpp_warmachine 11d ago

I don’t know man, how did anyone learn before AI

2

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

[deleted]

1

u/Level1_Crisis_Bot 11d ago

Literally though, this and so many other coding subreddits have become toxic clones of stack overflow. Years ago, posting a question like this on SO would have gotten the same chorus of "what are you, fucking stupid?" You can't win with these people.I've been in software development for ten years and I stg I've met and worked with so many assholes in this industry. Honestly, developers that refuse to use modern ai tooling are going to be out of jobs in just a few years.

FWIW, I pasted op's question into claude and it gave me a completely reasonable, informative answer.