You can't directly logout of WhatsApp on iPhone or Android, but you can delete the app or clear its data to essentially accomplish the same thing.
Results that may be inaccessible to you are currently showing.
Hide inaccessible resultsResults that may be inaccessible to you are currently showing.
Hide inaccessible results