This question has two near-identical answers.
I flagged this answer (note: answer was removed in the meantime, so link doesn't work anymore):
var answer = confirm("Save data?") if (answer){ //some code if yes } else{ //other code if no }
as a duplicate (copy) of this (older, lots of up-votes) answer:
var answer = confirm("Save data?") if (answer){ //some code } else{ //some code }
Use confirm instead of alert. This is the easiest way to achieve that functionality.
explaining the flag with:
this answer is a copy of second highly voted answer by Chuck Norris stackoverflow.com/a/9334679/2275490, the only thing he changed was adding "if yes" and "if no" at the commented code
Well, the flag was declined by a moderator for this reason:
its fairly boilerplate code, and arguably the "if yes", and "if no" add some more detail to the answer
My question is: Was this a mistake by the moderator? If not, what is the threshold to qualify an answer as a duplicate (copy)?