3

This question: Assign variable content to object property name was just marked as a duplicate of How do I add a property to a JavaScript object using a variable as the name?

The first question is about creating an object literal with dynamic properties in node, and the second is about assigning a value to a dynamic property of an existing object in a browser.

They're obviously similar, and the answers are nearly identical..., but are they duplicates? Would a person looking for an answer to the first question realize that the second question would have isomorphic solutions?

3
  • 4
    "Would a person looking for an answer to the first question realize that the second question would have isomorphic solutions?" Why would that matter? Someone else has realized that for them and marked the question as a duplicate. Assuming the answers are actually the same, the person who asked the question and anyone else who comes across it in the future will have the solution.
    – Cody Gray Mod
    Commented Mar 15, 2016 at 7:05
  • @CodyGray in this case it might matter because the second question contains jquery/dom that is unrelated to the question asked that needs to be parsed and found irrelevant by a human reader (not to mention undeclared variables, but I digress) - unless you assume people would go directly to the answers?
    – thebjorn
    Commented Mar 15, 2016 at 7:33
  • 1
    Well yeah, if I'm told "the answer to your question is over here," I'd start by looking at the answer. I might glance at the question, but I'd really only scrutinize it if the answer didn't make sense on its own. More generally, I don't think the questions have to be carbon-copies of each other to be duplicates. The whole reason for making a question as a duplicate is to avoid unnecessary duplication of answers. Everyone has slightly different code.
    – Cody Gray Mod
    Commented Mar 15, 2016 at 7:42

0

Browse other questions tagged .