Testing Hex Character Codes
===========================

Problem
-------

What does a Vertical Tab or a Backspace character actually do? I want to find out.

My experiment is to find out exactly what happens when every hex character is put into a string. I thought the best way to do this would be to created a nested loop to go through each of the 16 hexadecimal characters to create each possible 2 digit hex character code.

I soon discovered that you cannot use the `\x` escape character with interpolated variables, and so I expect what I have set out to do might be impossible.

```
const hexCharacters = "0123456789ABCDEF";
let code = "";
let char1 = "";
let char2 = "";

for (charPos1 = 0; charPos1 < hexCharacters.length; charPos1++) {
  for (charPos2 = 0; charPos2 < hexCharacters.length; charPos2++) {
    char1 = hexCharacters[charPos1];
    char2 = hexCharacters[charPos2];
    code = `${char1}${char2}`;
    printHexChar(code);
  }
}

function printHexChar(string) {
    let output = `<p>Hex Code ${string} = \x${string}</p>`; // THE PROBLEM IS CLEAR
    document.write(output)
}

```

I know it will also probably fail once it gets past 7F or whichever is the last character in the set, but that's not the main issue here! :D

Potential solution
------------------

### string.prototype.fromCharCode

This sort of string method approach would seem to be the answer, but it is meant for U-16 character codes, and that is not what I wanted to test. There doesn't seem to be an existing string method for hex codes. Probably because nobody would ever want one, but nevertheless it would be cool.

Conclusion
----------

Is there any way to create an escape character sequence from assembled parts that will render not as plain text, but as a proper escape character sequence?

Apologies if this has been asked before in some form, but with my feeble understanding of things I just couldn't find an answer.