npv2k1 / web3-todo-app

Consider using let or const instead of var JS-0239
Anti-pattern
Major
a year agoa year old
Unexpected var, use let or const instead
 1/* eslint-disable no-console */
 2
 3import Web3 from "web3";
 4declare var window: any 5
 6const getWeb3 = async () => {
 7  // Wait for loading completion to avoid race conditions with web3 injection timing.
Unexpected var, use let or const instead
 33  }
 34  function convertToHex(str: string) {
 35    var hex = "";
 36    for (var i = 0; i < str.length; i++) { 37      hex += "" + str.charCodeAt(i).toString(16);
 38    }
 39    return hex;
Unexpected var, use let or const instead
 32
 33  }
 34  function convertToHex(str: string) {
 35    var hex = ""; 36    for (var i = 0; i < str.length; i++) {
 37      hex += "" + str.charCodeAt(i).toString(16);
 38    }