WhatsApp has been improving its functionality and coming up with loads of features especially in group chats, giving the group administrators more control and making the chat more interactive. The CEO Mark Zuckerberg announced three specific privacy-centric WhatsApp features last month, blocking screenshots of view -once media, quiet exits from group chats and hiding your online status.
In the latest version, the settings provide you the granular control over who can see when you are online and when you last checked WhatsApp. Under WhatsApp Settings > Account > Privacy > Last seen and online, you can pick from four options for who can see your Last seen status which are everyone, my contacts, my contacts (except selected ones), and nobody. For the online status visibility on the app, you can mirror setting for your Last seen status above or just use Everyone option, so anyone in chat will see when you are online.