---
schema_version: "1"
id: 41e11647e8ce9d87b2f1f11038fed208226fec5a3335a9a00208b8105a271f4a
title: Variable.GetValue
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/marketing-cloud/guides/mc-programmatic-content/ssjs_utilitiesVariableGetValue.md
canonical_url: https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/ssjs_utilitiesVariableGetValue.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 902ec08e26a302a9883231cf84501af8ae0c01a5f09022a81f6fc1ee2cfaa858
products:
  - Marketing Cloud Engagement APIs and Programmatic Languages
  - Marketing Cloud
---
# Variable.GetValue

## Overview

Retrieves the value of a specified variable

### Syntax

Variable.GetValue(1)

### Function Properties

<!--complex table-->

| Ordinal | Type   |              | Description      |
| ------- | ------ | ------------ | ---------------- |
| **1**   | string | **Required** | Name of variable |

## Example

This sample code retrieves the value of the specified variable.

```
Variable.GetValue("@myAmpVariable");
```
