20

How can I do string interpolation in JavaScript? (117 net votes, 36 stars, asked in 2009) is currently marked as a duplicate of How to do string interpolation in javascript? (5 net votes, 3 stars, asked in 2014—5 years later!).

The former question was dupehammer closed by thefourtheye on July 27 this year. thefourtheye answered the latter question July 20 '14, and edited their answer to the latter question July 26 this year (one day before the closing of the former question).

Both questions are reasonably well written.

Should the "duplicate of" be reversed for these two questions, such that the latter is closed as a "duplicate of" the former question?

5
  • 8
    Usually, a later question is closed as a duplicate of the earlier (as you're suggesting) unless there's a solid reason why the later question is better (or has better answers). If there's no major reason why the later question is better, then ideally the duplicate designations should be reversed. Commented Oct 28, 2015 at 2:46
  • 5
    Probably should ask moderators to merge the two as both have good answers. Commented Oct 28, 2015 at 6:24
  • The duplicates have now been flipped.
    – Kyll
    Commented Oct 28, 2015 at 13:42
  • I am sorry. As ES6 has a cleaner way to do the string interpolation (which I mentioned in my answer and none of the old answers had that) I closed the canonical as the dup. I don't mind reversing the dups (which already happened). Sorry once again for all the fuss it created. Commented Oct 28, 2015 at 15:49
  • 1
    @thefourtheye Well, as of today, your answer is probably the best. I think the best course of action is now to merge the duplicate into the target and remove my community wiki placeholder for your answer.
    – Kyll
    Commented Oct 28, 2015 at 15:59

2 Answers 2

20

I have merged the two questions as requested. The original How can I do string interpolation in JavaScript? is the master question.

3

The issue was that while the canonical question was older and had more views and votes, the newer question had one very interesting answer...
The older question was posted when there were no native way to achieve the desired result.
That changed with ES2015, the latest version of JavaScript, and that change was pointed in the new interesting answer on the young question.

The newer question was Mjölnired as duplicate of the older one a while back.
The answerer then un-Mjölnired the new question and Mjölnired the old question as a duplicate of the newer one.
The Mjölnir was then countered by SOCVR and the duplicate relationship was reversed.

I added a temporary community wiki as placeholder until the merge happened, and then the newer question was merged into the older one and the wiki deleted.

3
  • 7
    I am actively trying to verbatise "Mjölniring".
    – Kyll
    Commented Oct 28, 2015 at 16:42
  • 4
    Don't overuse that verb. It could make people thor. Commented Oct 28, 2015 at 19:23
  • 3
    @Yakk Those people need to lightning up. Commented Oct 28, 2015 at 20:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .