If you are a WhatsApp user and your friend or anyone asked you for a six-digit code then you should be careful, don't send it directly. First of all confirm from that person if it is your acquaintance then only you decide to share that code, better if you share it via call. And, if you send it out directly without confirming then you may end up falling into a scam, your account will get hacked. WhatsApp users keep getting exposed to such scams or messages and it is difficult to recognize such messages.
This new scam message targets users by sending a message asking them to send a code by posing one of their contacts. This code is a confirmation code send by WhatsApp when a new account is formed by the user. If someone is trying to sign in from any other device and you received a message asking for that code then chances are complete that someone is trying to hack your WhatsApp account.
The information about this new WhatsApp scam is shared by Alexis Conran, a radio show host on Twitter. Further, he explained that the account of the sender is also hacked and there are chances that hackers will try to hack their contacts also by sending them a message asking them to send code.
You can save your account from getting hacked by enabling two-factor authentication on your WhatsApp account.