I am attempting to change the characters with X
and make it look something like this XXXXXT123
This is what I have tried:
var sno = 'TEST123';
alert(sno.slice(0,3).replaceWith('X'));
However, I encountered an error in the console
Uncaught TypeError: sno.slice(...).replaceWith is not a function(anonymous function)