:String —this type represents a collection of characters contained within within quotes
(double or single, see following). Unlike Java, the default value for String is empty ("").
"The quick brown fox jumps over the lazy dog" or
'The quick brown fox jumps over the lazy dog'
:Number —this is a numeric type that represents all numbers with decimal points. It is backed
by the 64-bit double precision floating point Java type. The default value of Number is 0.0 .
:Integer —this is a numeric type that represents all integral numbers. It is backed by the
32-bit integer Java type. The default value of an Integer is 0 .
:Boolean —as the name implies, this type represents the binary value of either true
or false .
:Duration —this type represent a unit of time. You will encounter its use heavily in animation
and other instances where temporal values are needed. The supported units include ms , s , m ,
and h for millisecond, second, minute, and hour respectively.
:Void —this type indicates that an expression or a function returns no value. Literal
representation of Void is null .
Variables can have three distinct scopes, which implicitly indicates the access level of the
variable when it is being used.
Script variables are defined at any point within the JavaFX script file outside of any code block
(including class definition). When a script-level variable is declared, by default it is globally
visible within the script and is not accessible from outside the script (without additional