Unexpected Output through \r carriage return

Viewed 49
var t2 = "\tMohamed\rMazen \n \tof \rMastering\n\t\t\programming";
console.log(t2);

The output using JavaScript is:

   Mohamed
Mazen 
    of 
Mastering
        programming

Shouldn't it be:

Mazen mohamed
Mastering of 
                  programming ?
0 Answers
Related