I have started learning swift 1.2 from tutorialspoint. There i found i can call a following function by add(9,2) but Xcode not leting me do that. It says missing argument b: in call
. but it is working in tutorialpoint's online playground. Is this happening becuase of version incompatibility or what?
import UIKit
func add(a:Int, b:Int)->Int{
return a+b
}
var value = add(9,b:2)
var str = "\(value)"
print(str)