You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
//basic type
varyes=truevarno=falsevarinteger=1vardecimal=1.111varstr="this is string type"vararray=[1,2,3]vararrayValue=array[0]vardic=["key1":1,"key2":2]vardicValue=dic["key1"]
//declare
vara=1
//if
if a >1{}elseif a <0{}else{}
//while
while a >0{
a = a -1}repeat{
a = a -1}while a >0
//fuction
func test(param1, param2){
//do something
}test(param1: p1, param2: p2)
//class
classFather{varheightfunc init(){
//init func will call automatically when new a instance
}func run(){}}classSon:Father{varagefunc init(){
//first call super.init, then call this
}}varson=Son()
son.run()
you can see internalScript.far and find more usage