Swift

Everything about the Swift programming language, from basic to advanced, from simple to complex

How to Concatenate Strings in Swift (5 Approaches)

Updated: February 23, 2023 By: Khue

String concatenation involves combining 2 or more strings into a single string. This practical and straight-to-the-point will walk you through 5 different ways to concatenate strings in Swift…

The Underscore Character (_) in Swift

Updated: February 22, 2023 By: Khue

This concise, practical article walks you through some use cases of the underscore character _ in Swift. Omitting Variable Names in Tuples Suppose you have a tuple that…

Defining Functions in Swift

Updated: February 22, 2023 By: Khue

This concise, example-based article shows you how to define functions in Swift. Defining a Basic Function A basic function definition consists of the func keyword, a function name,…

Optional, Nil, and Nil Check in Swift

Updated: February 22, 2023 By: Khue

This article is about the nil value and the Optional type in Swift. Nil and Optional In Swift, optional and nil are related concepts, but they are not…

Different Ways to Make Comments in Swift

Updated: February 22, 2023 By: Khue

This short and straight-to-the-point article shows you a couple of different ways to comment out a single line or a block of code in Swift. Line Comment A…

Swift Variables: Let, Var, and the Difference between Them

Updated: February 22, 2023 By: Khue

When you’re writing code in Swift, you’ll come across 2 keywords that are used to declare variables: var and let. These keywords may seem similar at first glance,…

1 5 6 7