Hello community,
This is my first post here. It's a super basic question. I'm starting to learn Swift and I'm using a Swift Playground from Xcode.
I have tried to print a text like this:
print("Hello, world")
However the output is adding a "\n" symbol, resulting in:
"Hello, world\n"
Any thoughts?
Thanks in advance, Rodrigo
Welcome to the forum.
You get :
"Hello, world\n"
on the right part of the screen.
If you look in the console at the bottom, you just see:
Hello, world
The reason is that, for the next print, the linefeed (\n) was automatically added to present new print on a newline.
So, it is normal behavior, nothing to change or worry about.