Siebel eScript Language Reference > Using Siebel eScript > Coding with Siebel eScript >

Determining the Data Type of a Variable


You can use the typeof operator to determine and set the data type of a variable.

To determine the data type of a variable

  • Use one of the following formats:
    • var result = typeof variable
    • var result = typeof(variable)

      To improve readability, you can place parentheses around the variable operand, which makes typeof look like the name of a function rather than an operator keyword. Using these parentheses is functionally the same as not using them. They have no impact on program execution.

Immediately after Siebel CRM encounters one of these code lines, it sets the contents of the variable to one of the following string values:

    • boolean
    • buffer
    • function
    • object
    • number
    • string
    • undefined
Siebel eScript Language Reference Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Legal Notices.