This is my code:
function send() {
Web3.providers.HttpProvider.prototype.sendAsync = Web3.providers.HttpProvider.prototype.send;
var web3 = new Web3("http://localhost:8545");
var data = web3.eth.getHashrate();
alert(data);
}
when i run the send() function I am getting this error: "TypeError: this.provider.sendAsync is not a function
"