SyntaxFix
Write A Post
Hire A Developer
Questions
Try this
function replaceNewLine(str) { return str.replace(/[\n\r]/g, ""); }