DEV Community

Edison Ade
Edison Ade

Posted on

3 2

Swift Programming 101

Ten years ago, in July of 2010, Chris Lattner created a folder on his computer called
Shiny, and a new computer language was born. Four years later, in 2014, that language, renamed Swift, was introduced to the public, and was greeted with a mixture of surprise and excitement — and skepticism.

A complete Swift command is a statement .
A Swift text file consists of multiple lines of text. Line breaks are meaningful. The typical layout of a program is one statement.

var greeting = "Hello, playground"

The print command provides instant feedback in the Xcode console.
You can combine more than one statement on a line, but then you need to put a semicolon between them:

print("hello"); print("world")

First set of code

Let in Swift is a constant to declare variables and cannot be reassigned.

Code Snippets

Top comments (0)

👋 Kindness is contagious

Engage with a wealth of insights in this thoughtful article, valued within the supportive DEV Community. Coders of every background are welcome to join in and add to our collective wisdom.

A sincere "thank you" often brightens someone’s day. Share your gratitude in the comments below!

On DEV, the act of sharing knowledge eases our journey and fortifies our community ties. Found value in this? A quick thank you to the author can make a significant impact.

Okay