0

Sir why they had kept the \n in the output

21st Jul 2018, 5:33 AM
Peesapati Gautham
Peesapati Gautham - avatar
20 ответов
+ 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
21st Jul 2018, 5:59 AM
Vedant Bang
Vedant Bang - avatar
+ 1
can I see your code?
21st Jul 2018, 6:01 AM
Vedant Bang
Vedant Bang - avatar
+ 1
why?
21st Jul 2018, 6:02 AM
Satyam
+ 1
click on the plus and then you can link your code.
21st Jul 2018, 6:03 AM
Satyam
+ 1
ok
21st Jul 2018, 6:03 AM
Satyam
+ 1
or you can paste the code here if it is not too big.
21st Jul 2018, 6:04 AM
Satyam
+ 1
show us
21st Jul 2018, 6:07 AM
Satyam
0
not understand
21st Jul 2018, 6:00 AM
Peesapati Gautham
Peesapati Gautham - avatar
0
could you elaborate your question then?
21st Jul 2018, 6:01 AM
Vedant Bang
Vedant Bang - avatar
0
sir i asked that why in the out put \n is present
21st Jul 2018, 6:01 AM
Peesapati Gautham
Peesapati Gautham - avatar
0
i dont no java
21st Jul 2018, 6:01 AM
Peesapati Gautham
Peesapati Gautham - avatar
0
ok
21st Jul 2018, 6:02 AM
Peesapati Gautham
Peesapati Gautham - avatar
0
ph no
21st Jul 2018, 6:02 AM
Peesapati Gautham
Peesapati Gautham - avatar
0
you may post your code in here
21st Jul 2018, 6:02 AM
Vedant Bang
Vedant Bang - avatar
0
actually i am not saving codes
21st Jul 2018, 6:03 AM
Peesapati Gautham
Peesapati Gautham - avatar
0
can i send screen short
21st Jul 2018, 6:03 AM
Peesapati Gautham
Peesapati Gautham - avatar
0
you can save you code, then we will be able to see it
21st Jul 2018, 6:04 AM
Vedant Bang
Vedant Bang - avatar
0
in the input if we press enter then in out put it will be displaying \n
21st Jul 2018, 6:07 AM
Peesapati Gautham
Peesapati Gautham - avatar
0
please give us your code by posting it here
21st Jul 2018, 6:07 AM
Vedant Bang
Vedant Bang - avatar
0
actually in out put there will be any \n symbol
21st Jul 2018, 6:07 AM
Peesapati Gautham
Peesapati Gautham - avatar