for (let i = length; i >= 1; i--) 
    {
        summ += numbers.charAt(length - i) * pos--;
        if (pos < 2) pos = 9;
    }