Is there a function to determine the variable type in Swift? I presume there might be something like like type() in Python.
type()
I\'d like a way to judge if
Someone mentioned this above, but I think it deserves visibility as an answer rather than a comment. You can now simply use type(of: ___):
var red, green, blue: Double print(type(of: green))
yields
Double