I want to create a new account via code (Node.js), so I ran the following code, which was copy-pasted from the docs:
How ever accounts' value is an empty array, and therefore I'm getting this error:
web3.eth.accounts.create is not a function
which makes sense because
Array doesn't have a method named
How do I create a new account?