Supported JavaScript Syntax

Below is a concise, product‑safe summary of the JavaScript syntax supported in the iX Hello Customer v2 Expression Engine.

Literals:

Literals are the fixed, constant values written directly in an expression. They represent actual data, not variables or logic.

    42                             // Number    
    3.14                           // Float    
    'hello'                        // String (single quotes)    
    "hello"                        // String (double quotes)    
    `hello ${name}`                // Template literals    
    true / false                   // Boolean    
    null                           // Null    
    [1, 2, 3]                      // Array literal    
    { name: 'John', age: 30 }     // Object literal    

Operators:

Operators are symbols that tell the engine what operation to perform on values (literals or variables).

    // Arithmetic    
    a + b    a - b    a * b    a / b    a % b    a ** b    
         
    // Comparison    
    a === b    a !== b    a == b    a != b    
    a > b      a >= b     a < b    a <= b    
         
    // Logical    
    a && b    a || b    !a    a ?? b    
         
    // Ternary    
    condition ? valueIfTrue : valueIfFalse    
         
    // Member access    
    obj.property    obj['property']    arr[0]    arr[arr.length - 1]    
         
    // Safe navigation (built-in — no ?. syntax needed)    
    // Accessing a property on null/undefined returns undefined instead of throwing    
    obj.property    obj.nested.deep    arr[0]    
         
    // Spread    
    [...arr1, ...arr2]    { ...obj1, ...obj2 }    
         
    // typeof    
    typeof value === 'string'    

Arrow Functions (Concise Only)

Arrow functions are supported only in concise form and only when used as callbacks to array methods. This is an intentional design choice to keep expressions safe, readable, and side‑effect free.

Block-body arrow functions are explicitly not supported. The parser only accepts expression-body arrows. Since expressions are read-only (no variable declarations, no assignments), block bodies provide no additional capability over concise Form.

Not Supported

Safe Navigation (Built-in) : In standard JavaScript, trying to read a property from a null or missing value will crash your code with a TypeError. This engine handles that automatically — if any value in a chain like 'obj.nested.deep' turns out to be null or undefined, it simply returns 'undefined' instead of throwing an error. This protection applies to all property lookups by default, so there's no need to use the '?.' operator syntax here.

"If you need examples to know how these expressions are applied, please use our new and improved iX Hello Employee"

Last updated

Was this helpful?