Both are bad for your score
Foreclosure and bankruptcy are very bad for your credit score. No one can tell you for sure which is worse because no one knows the FICO formula, but take it from me – they are bad.
Bankruptcy, foreclosure and charged off credit card accounts will show on your credit report for 7-years from the date of first delinquency while a chapter 7 bankruptcy will show for 10-years.
As long as they show on your credit report – they impact your credit score, although as time goes by their impact diminishes.
Anyone who gets your credit report will be able to see these negative items, although they won’t be able to tell how exactly these item affect your credit score.
BTW, a potential employer must have your written consent to obtain a copy of your credit report.
Hope this helps.