A [recent question][1] was asking how to find the longest word in a string using JavaScript. The asker posted some code which had a few errors in the `for` loop used to attempt to solve the question.

That question was closed as a duplicate of [another question][2] where the asker was also looking for a method to find the longest word in a string, but the reason their code didn't work was because they incorrectly subtracted one from the limit in the `for` loop condition.

However, this question was reopened by a gold badge user, saying that because the issue with their code is different, that questions are not duplicates if the underlying problem behind them is different, even if they are asking for the same thing using similar code.

Should the question have been closed?


  [1]: https://stackoverflow.com/questions/29726713/javascript-writing-a-function-that-returns-the-longest-word-in-a-string-with-n
  [2]: https://stackoverflow.com/questions/17386774/javascript-find-longest-word-in-a-string