The account can be created using the following command.
web3.personal.newAccount(newPassword);
This method generates a new private key and stores it in the key store directory. The key file is encrypted with the given passphrase/password and returns the address of the new account.
Best Answer
At Web3 version 1.0, utility functions like
toWei
and many others have been moved to theweb3.utils
.To check all utility functions refer to:
https://web3js.readthedocs.io/en/1.0/web3-utils.html