npv2k1 / web3-todo-app

Prefer var declarations be placed at the top of their scope JS-0102
Anti-pattern
Minor
a year agoa year old
All 'var' declarations must be at the top of the function scope
 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;