var year, month, checkDay;

for(year=1980;year<2050;year++){
  for(month=0;month<12;month++){
    var checkDay = new Date(year, month, 13); 
    if(checkDay.getDay()==5){
      document.write(checkDay.toLocaleDateString() + " ");
    }
  }
  document.write("<br>");
}
Run Pen

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.