---
schema_version: "1"
id: 1ff178fb8d8979ad6e0308e83c5f87d2440ef442f577582acec84f69a615d565
title: AMPscript Variable Functions
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/marketing-cloud/guides/mc-programmatic-content/ssjs_platformAMPscriptVariableFunctions.md
canonical_url: https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/ssjs_platformAMPscriptVariableFunctions.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: dcf87fddcda890da4537b774ddf5c38f03cb5eba450afc6cf51efa0a3abaaea7
products:
  - Marketing Cloud Engagement APIs and Programmatic Languages
  - Marketing Cloud
---
# AMPscript Variable Functions

The Variable object retrieves values from declared AMPscript variable in the JavaScript context, allowing you to use both languages as necessary for your activities. All variables must follow the AMPscript variable-naming syntax. Variable server-side JavaScript functions will add a @ prefix to any variable that does not include that prefix. These functions can only work with AMPscript variables in the current context.
