What is the ↵–character in chrome console?

前端 未结 1 808
清酒与你
清酒与你 2020-12-14 17:05

I\'m pulling in some data from an api and console.log in chrome:

Chrome prints it like asdföklajsd↵New line!

I would like to replace the ↵ character with a

相关标签:
1条回答
  • 2020-12-14 17:38

    It's a return character.

    Try replacing them like this:

    myString = myString.replace(/(\r\n|\n|\r)/gm, "<br />");
    
    0 讨论(0)
提交回复
热议问题