I have a little problem with javascript and since I don't have a very high level, I would need some help please.

Actually I have a "string" of bytes that I have to hash. The problem being that I have to add another byte to it that I generate in a script. I can't add this one all at once (ie do "+ '\x25'") because I have to add the 1st digit first and then the 2nd. But when I concatenate the new byte, it is interpreted as 4 character instead of one, namely "\", "x", "2", "5" instead of "%". Would there be a way to add the byte without translating it into ASCII?
Try this:
const firstDigit = 2;
const secondDigit = 5;
const number = `${firstDigit}${secondDigit}`;
const charToAdd = String.fromCharCode(Number.parseInt(number, 16));
console.log(charToAdd);