WhatsApp does not have a log out option on the iOS or Android apps. This article describes how to uninstall the app on iOS and clear data on Android, which are the only ways to log out for all purposes.
How to Log Out of WhatsApp! [iOS & Android]
To log out of WhatsApp on iOS, you’ll essentially need to delete the app from your device. If you haven’t already backed up your app data, follow the instructions at the end of this article before proceeding.
Go to your iOS settings.
Select iPhone Storage.