string javascript, exceto o último caractere

id.slice(0, -2)
Worthy Warrior