Did john Locke like capital punishment?

Yes Locke approved of capital punsuhment
People think that he did not because he believed in Natural Law which states that every person has the right to life, liberty and property. But once someone violates an individuals right to life they forfeit their rights, so they deserve the death penalty.