I was reading over some of the MDN pages on regex, and came across a reference to the backspace unicode character, which intrigued me, because I wouldn't have though that backspace would have a character.
The code for it is \U+0008
. I decided to run a test and see what it was/did, so I entered 'abcd\u0008efg'
, in a browser, which returned "abcdefg"
. I got the same for console.log
.
My question is, what is a backspace character, and does it do anything when rendered in html/javascript?
I think the backspace character is in Unicode for compatibility with ASCII. ASCII has several control characters that do not make much sense to have in a text file, but were transmitted to and from terminals. For example bell, escape, acknowledge, end of transport block.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With