Не надо использовать this.
Это не конструктор, а обычная функция
var txt = "АБВ";
let abc = [" ","А","Б","В","Г","Д","Е","Ж","З","И","К","Л","М","Н","О","П","Р","С","Т","У","Ф","Х","Ц","Ч","Ш","Щ","Ъ","Ы","Ь","Э","Ю","Я"],
];
function toWeight(inp){
let a = [...inp].reduce( (a, sym) => a+Math.max( abc.indexOf(sym.toUperCase() ),0), 0)
var ret = (a * 999999999) % 25022020;
return ret;
}
var b = toWeight(txt,0);
var out = b.toString(16);
document.write(out);