• 0

How to remove trailing backslash n from a string?

var str = 'abcn';
console.log(str.trim()); // abc