Swift: Print

Swift Print:

With the following code, we learned how to output a single line of text with the help of swift print function:

print(":D");

//Output: :D

By adding more print() commands, we can output several lines:

print("Hello");
print("Bye");

It will output:

Hello
Bye

Take note of how the printed statements are in the same order as our code. This is due to the fact that Swift code is read from top to bottom.

Let’s put everything we’ve learned so far to work by taking a quiz!

Helpful Tools:

Here are some useful tools to help you along your journey!

Setting up an IDE (Integrated Development Environment) can be difficult for beginners. The Online Compiler will enable you to run your code inside your browser without the need to install an IDE. If you need a more detailed explanation of a specific topic, the best place to find answers is in the Official Documentation.

Scroll to Top
%d bloggers like this: