Return type of javascript methods

#1

What are the possible types of the value returned by a method?
Examples:
echoString: member function(): string js server
echoDouble: member function(): double js server
echoInt: member function(): int js server
what else? void, arrays, object, c3Types

0 Likes

#2

A function can return any type (not just primitives). To see the list of primitive types, you can run the command: c3ShowType(PrimitiveType) in the console. I have printed the list here for your convenience.

Binary
Boolean
Byte
Character
DateTime
Decimal
Double
Float
Integer
Json
LongInteger
String

0 Likes

#3

It’s also possible that a method has no return value. For example,

myMethod: function(string: value) js server
1 Like