Hi, I am trying to follow this video https://www.youtube.com/watch?v=_vy5oIXg9uA
I copied and pasted the code exactly the same, I think. I’m trying to run the page in a browser (netbox and brave) and it doesn’t show me anything. Only a white background… I don’t know what I am doing wrong…
Also I was trying with tx and I had the same result…
<script src="https://cdn.jsdelivr.net/npm/[email protected]/lib/index.min.js"></script>
<p id="blockNumber"></p>
<script>
const NODE_URL = "https://speedy-nodes-nyc.moralis.io/f59be88c6be7a87eb3736faf/bsc/mainnet";
let web3 = new Web3(new Web3.providers.HttpProvider(NODE_URL));
web3.eth.getBlockNumber()
.then(funtion(blockNumber) {
document.getElementById("blockNumber").innerHTML = "Block number: " + block Number;
});
</script>