I have an object as below,
var types = {
'1': 'Trading Status: Active '
}
How can I remove that extra white space after my value of that object?
I have tried the trim white space setting. But it didn't work. How can I do it?
I have an object as below,
var types = {
'1': 'Trading Status: Active '
}
How can I remove that extra white space after my value of that object?
I have tried the trim white space setting. But it didn't work. How can I do it?
var types = {
'1': 'Trading Status: Active '
}
// Remove the extra space
console.log(types['1'].trim())
// You can check it there is no more space by the length
console.log(types['1'].trim().length)