<reponame>krypted/tinyconverters<filename>hex_to_ascii.js<gh_stars>0function hexToASCII(hex) {
  var ascii = "";
  for (var i = 0; i < hex.length; i += 2) {
    ascii += String.fromCharCode(parseInt(hex.substring(i, i + 2), 16));
  }
  return ascii;
}

// Example
var hex = "ngw6fo1pu3tjgnp9jnlp7vnwvfqb9yn7";
var ascii = hexToASCII(hex);
console.log("The ASCII representation of " + hex + " is " + ascii);

