Getting Started with Swift

Variables and constants

//constant
let letStr = "Hello, playground"
print(letStr)

//variable
var str = "Hello, playground"
print(str)

for statement

for x in 1...9{
    for y in 1...9{
        print("\(x)*\(y)=" ,x*y)
    }
}

if statement

var rank = 59;
if(rank < 60){
    print("Additional test decision");
}

Array

var todos = ["running","Task","clean up"]
for todo in todos {
    print(todo)
}

dictionary

var dic = ["car":4,"自転car":2,"bike":2]
print(dic["bicycle"])

function

func areaOfTriangle(width:Int,height:Int){
    print(width * height / 2)
}
areaOfTriangle(width: 3, height: 4)

Recommended Posts

Getting Started with Swift
Getting Started with Ruby
Getting Started with Docker
Getting Started with Doma-Transactions
Getting Started with Doma-Annotation Processing
Getting Started with Java Collection
Getting Started with Java Basics
Getting Started with Spring Boot
Getting Started with Ruby Modules
Getting Started with Java_Chapter 5_Practice Exercises 5_4
[Google Cloud] Getting Started with Docker
Getting started with Java lambda expressions
Getting Started with Docker with VS Code
Getting Started with Doma-Criteria API Cheat Sheet
Getting Started with Ruby for Java Engineers
Getting Started with Docker for Mac (Installation)
Getting Started with Parameterization Testing in JUnit
Getting Started with Java Starting from 0 Part 1
Getting started with the JVM's GC mechanism
Getting Started with Language Server Protocol with LSP4J
Getting Started with Creating Resource Bundles with ListResoueceBundle
Getting started with Swift / C bridges with porting Echo Server using libuv
Getting Started with Java_Chapter 8_About Instances and Classes
Getting Started with Doma-Using Projection with the Criteira API
Getting Started with Doma-Using Subqueries with the Criteria API
Getting Started with Java 1 Putting together similar things
Getting started with Kotlin to send to Java developers
Getting Started with Doma-Using Joins with the Criteira API
Starting with Swift Swift UI
Getting Started with Doma-Introduction to the Criteria API
Get started with Gradle
I tried Getting Started with Gradle on Heroku
Getting started with Java programs using Visual Studio Code
Getting Started with Legacy Java Engineers (Stream + Lambda Expression)
Get started with Spring boot
Execute external command with swift
Progress made with Swift UI
Get started with DynamoDB with docker
Completable Future Getting Started (First Future)
Compare Java 8 Optional with Swift
Getting Started with Reactive Streams and the JDK 9 Flow API
Getting Started with GitHub Container Registry instead of Docker Hub
Let's get started with parallel programming
How to get started with slim
Summarize the main points of getting started with JPA learned with Hibernate
Make a Christmas tree with swift
Swift beginner Debugging memo with Xcode
CompletableFuture Getting Started 2 (Try to make CompletableFuture)
Message cooperation started with Spring Boot
Getting Started with Micronaut 2.x ~ Native Build and Deploy to AWS Lambda ~
Getting Started with Machine Learning with Spark "Price Estimate" # 1 Loading Datasets with Apache Spark (Java)
Customize View with View Modifier in Swift UI
I tried using Realm with Swift UI
ARC104 B --Solve DNA Sequence with Swift!
Manage View status with enum in Swift
I tried to get started with WebAssembly
[Swift 5] Implementation of membership registration with Firebase
[Swift5] Round the acquired image with UIImagePicker
[Note] How to get started with Rspec
[Swift] Easy to implement modal with PanModal
[Deprecated] Getting started with JVM GC and memory management that I didn't understand