-1

When I am writing code in an Xcode Playground, the Play Ground Print "/n" On latest of my code result. How can I fix it?

Image Of My Question

Caleb Kleveter
  • 11,170
  • 8
  • 62
  • 92

1 Answers1

2

In swift 2, there has no println anymore.

Print is now equivalent to println before, so it has "\n".

The way to fix it:

print(saeed, terminator: "")
Twitter khuong291
  • 11,328
  • 15
  • 80
  • 116
  • Read what khuong said. If you add `terminator: ""` as a second parameter, it does not add a newline at the end of the line. – Duncan C Dec 26 '15 at 14:58