Title with javascript and slice property

I’m currently working on a project with a Radio Api that we made. I was working with javascript and I wanted to create a fadeout title that makes the last 2 letters of a song fade out. I ended up with something like:

let srt =  document.getElementById('songTitle');
if(srt.length > 20)
{
 let sliced = srt.slice(-2);
 sliced.style.opacity = '1';
}

This code didn’t work at all, so I tried another approach to the code and made a css style with the classname of “.FadeOut”.
Then changed the javascript with:

let srt =  document.getElementById('songTitle');
if(srt.length > 20)
{
 let sliced = srt.slice(-2);
 sliced.classList.add(".FadeOut");
}

Still, the code is not working. Then I tried to see if in the console.log the slicing of the last 2 letters was doing it right, and yes, the console gives me the last 2 letters of the title I’m working on…
Any suggest would be great!!
Thanks!