func ประกาศ ฟังชั่น ตามด้วยชื่อของฟังชั่น และตัวอาร์กูเมนต์
ใช้เครื่องหมาย -> ในการบอกชนิดของ return และค่าของรีเทริน์
ตัวอย่าง
-
func Hello(name:String) -> String{
-
return "Sawasdee Ka (name)“ }
-
Hello("David”)
In Remembrance of King Bhumibol Adulyadej
5 December 1927 – 13 October 2017
—
by
func ประกาศ ฟังชั่น ตามด้วยชื่อของฟังชั่น และตัวอาร์กูเมนต์
ใช้เครื่องหมาย -> ในการบอกชนิดของ return และค่าของรีเทริน์
ตัวอย่าง
func Hello(name:String) -> String{
return "Sawasdee Ka (name)“ }
Hello("David”)
Leave a Reply