0
Sir why they had kept the \n in the output
20 Answers
+ 1
\n is an escape sequence which brings the cursor to the next line.
example code: in JavaScript
let a = "Hello\nWorld";
console.log(a);
the output is
Hello
World
however if you want to print the characters \n, te then you escape the \n as well by adding another
\
example
let a = "\\n";
console.log(a);
output is \n
+ 1
can I see your code?
+ 1
why?
+ 1
click on the plus and then you can link your code.
+ 1
ok
+ 1
or you can paste the code here if it is not too big.
+ 1
show us
0
not understand
0
could you elaborate your question then?
0
sir i asked that why in the out put \n is present
0
i dont no java
0
ok
0
ph no
0
you may post your code in here
0
actually i am not saving codes
0
can i send screen short
0
you can save you code, then we will be able to see it
0
in the input if we press enter then in out put it will be displaying \n
0
please give us your code by posting it here
0
actually in out put there will be any \n symbol