# Transitioning from C# to JavaScript expressions

> This page helps you move existing Maestro processes from C# expressions to JavaScript expressions. UiPath is deprecating C# as an expression language in Maestro to provide a unified scripting experience, modern syntax highlighting, and broader compatibility with other Automation Suite components.

## Purpose

This page helps you move existing Maestro processes from C# expressions to JavaScript expressions. UiPath is deprecating C# as an expression language in Maestro to provide a unified scripting experience, modern syntax highlighting, and broader compatibility with other Automation Suite components.

## What this change means

- C# expressions continue to work and are fully supported until they are officially removed in a future release.
- New Maestro projects and features now use JavaScript expressions by default.
- We recommend that you migrate existing expressions to JavaScript to ensure forward compatibility.

If you see a yellow alert message, it means your project currently uses the older C# expression editor. You can continue working with your existing expressions, but we recommend starting to migrate them to JavaScript.

![expression editor prompt warning java script](https://dev-assets.cms.uipath.com/assets/images/maestro/expression_editor_prompt-cb04d2b4.webp)

## Key differences at a glance

| Concept | C# syntax | JavaScript syntax | Notes |
| --- | --- | --- | --- |
| String concatenation | `"Hello " + name` | `"Hello " + name` | Identical in both languages. |
| Case conversion | `userName.ToUpper()` | `userName.toUpperCase()` | Method name uses lowercase `toUpperCase`. |
| Equality | `amount == 100` | `amount === 100` | Use `===` for strict equality. |
| Null or empty | `string.IsNullOrEmpty(x)` | `!x` or `x === ""` | JavaScript treats `null` and `undefined` as falsy. |
| Collections length | `items.Count` | `items.length` | Property name differs. |
| Conditional expression | `amount > 5000 ? "High" : "Low"` | `amount > 5000 ? "High" : "Low"` | Same syntax in both languages. |
| String interpolation | `$"Hello {name}"` | `` `Hello ${name}` `` | Use backticks (`` ` ``) for template literals. |
| Date now | `DateTime.Now` | `new Date()` | Use the JavaScript `Date` object. |
| Math | `Math.Round(x)` | `Math.round(x)` | Function names are lowercase in JavaScript. |

## How to update existing expressions

1. Open the Expression Editor for each affected property or gateway condition.
2. Copy the C# expression and adapt it using JavaScript syntax (refer to the table Key differences at a glance).
3. Use **Test** in the editor to confirm the result.
4. Save and republish your process.

:::tip
When migrating complex formulas, validate variable names and ensure all string comparisons use `===`.
:::

## Example migration

**Before (C#):**
    vars.total = items.Sum(x => x.Price);
    if (vars.total > 10000) vars.priority = "High";

**After (JavaScript):**
    vars.total = items.reduce((sum, x) => sum + x.Price, 0);
    if (vars.total > 10000) vars.priority = "High";

 
## Frequently used equivalents

| Common action | C# | JavaScript |
| --- | --- | --- |
| Check multiple conditions | `(a && b) \|\| c` | `(a && b) \|\| c` |
| Parse number | `int.Parse(x)` | `parseInt(x)` |
| Convert to string | `value.ToString()` | `String(value)` |
| Round to 2 decimals | `Math.Round(x, 2)` | `Number(x.toFixed(2))` |
| Compare ignoring case | `name.Equals("UIPath", StringComparison.OrdinalIgnoreCase)` | `name.toLowerCase() === "uipath"` |

## Testing tips

- Use the **Test** button in the Expression editor to confirm outputs.
- Watch for differences in null handling and type coercion (`===` vs `==`).
- Strings and numbers automatically convert in JavaScript; use explicit casts if accuracy is critical.

## Next steps

- Start writing new expressions in JavaScript.
- Update existing processes over time using this guide.
- Plan for migration using either Autopilot or manual translation.
- Track future [release notes](https://docs.uipath.com/maestro/automation-suite/2.2510/release-notes/2026) for the eventual removal of C# expressions.
