«любой» - это тип, который обозначает все значения, с которыми может работать программа Ballerina.
any myVal = "this is a string value";
// Unsafe type cast, hence the union type.
string | error myStr = <string> myVal;
// Following is also valid based on the definition of the "any" type.
any myVal = 10;
"var" - это способ объявления переменной, тип которой выводится из выражения в правой части. Как только тип переменной получен, вы можете назначать только значения этого типа.
// This is equivalent to 'string a = "this is a string value";'
var a = "this is a string value";
// Now the following will result in a compilation failure.
a = 10;