Escape sequences in strings: carriage return, backspace, form feed

How exactly works

  • \r carriage return
  • \b backspace
  • \f form feed

I just tested them in browser’s console.
The last two give
var a = “test\ba”;
var b = “test\fb”;
console.log(a); // testa
console.log(b); // testb

I don’t know why both generates an “strange” character.
\r does nothing
var c = “test\rc”; // testc