If i do something like:
console.log('a'+ '\n' +
'b'+ '\n' +
'c');
I will get in console:
`a
b
c`
but if i try to return it such as:
function letter() {
return 'a'+ '\n' +
'b'+ '\n' +
'c';
}
letter();
it prints out 'a\nb\nc'. how do i get the return to be the same as what it is in console.log only using the return statement?
it prints out fine in google developer console but i am using a console from repl.it so i guess it depends on how that console is formatted?
console.log(letter());Also, your second code snippet doesn't print anything (unless you're typing directly into the console)console.log(orconsole.erroretc.)