Purpose
You want to return a function result in your JavaScript function
 

Solution
Use the function with parentheses e.g.

JavaScript

Remark
The notation without parentheses

JavaScript

is syntactically correct but returns the "toUpperCase" string function and not its result. In most cases this is not what you intend. It is possible (but rarely makes sense) to use the returned function in subsequent JavaScript calls; see the examples 3 and 4 below.

Example 1
GuiXT

CallJS x = toUpper "abcde"
Message "&V[x]"

JavaScript


Example 2
GuiXT

CallJS x = toUpper "abcde"
Message "&V[x]"

JavaScript

		


Example 3
GuiXT

CallJS mytoupper = toUpper "xyz"
CallJS x = mycall "&V[mytoupper]"  "abcde"
Message "&V[x]"

JavaScript


		


Example 4
GuiXT

CallJS mytoupper = toUpper
CallJS x = mycall "&V[mytoupper]"  "abcde"
Message "&V[x]"

JavaScript


		


 

Components
InputAssistant + Controls