My friend doesn’t recommend this action.
He explained to me which I don’t understand very well.
If your 401K earn more interest other places than the interst you have to pay from borrowing money, it is not wise to use 401K. Well consult with experts.
Please also check transaction fee which is not penalty but cost .