I have following code to replace left spaces with a specific string but, It is not working as I want.
This will surely do in two lines:
var str =' asdadasdad as asdasd asasd'; console.log(str.trim().padStart(str.length, 'x'));