Skip to content

Instantly share code, notes, and snippets.

@IhwanID
Last active March 17, 2020 08:15
Show Gist options
  • Select an option

  • Save IhwanID/4db9a2be0b7bf2617f6a2aefa972cfd3 to your computer and use it in GitHub Desktop.

Select an option

Save IhwanID/4db9a2be0b7bf2617f6a2aefa972cfd3 to your computer and use it in GitHub Desktop.
Learn Swift
import UIKit
let name = "Ihwan"
var age = 17
var isHungry: Bool = false
let ๐Ÿ‡ฎ๐Ÿ‡ฉ: String = "Indonesia ๐Ÿ‡ฎ๐Ÿ‡ฉ"
var height: Float = 168.0;
print("Hi All \nmy name is \(name)! \ni'm from \(๐Ÿ‡ฎ๐Ÿ‡ฉ)")
print("my name consists of \(name.count) characters")
print("Nice to meet you all ๐Ÿ™Œ๐Ÿป")
print("i'm \(age) y.o, next month i'll be \(age+1)")
print("i was born in 2002")
import UIKit
import Foundation
var friends = ["tama", "eko", "fadhil", "ihwan"]
var age = ["17", "20", "23", "16"]
var education = ["sd", "s1", "s3", "smp"]
print("--- Family Card - Kartu Keluarga Kontrakan ---")
print("-----------------------------------------")
print(" No | Nama | Umur | Pendidikan")
print("-----------------------------------------")
for i in 0...3{
print("| \(i+1) | \(friends[i]) | \(age[i]) | \(education[i])" )
print("-----------------------------------------")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment