Links

net_version

Returns the current network id
web3.net.version
Parameters
none
Returns
The current network id.
Example
var version = web3.net.version;
console.log(version);
> 1023
​