# New Feature: Share script variables between components

**URL:** <https://cl.desmos.com/t/new-feature-share-script-variables-between-components/34>\
**Category:** Announcements\
**Created:** [April 24, 2018, 5:50am UTC](https://cl.desmos.com/t/new-feature-share-script-variables-between-components/34 "2018-04-24T05:50:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![denis](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/denis/32/9_2.png) [@denis](https://cl.desmos.com/u/denis)\
**Post date:** [April 24, 2018, 5:50am UTC](https://cl.desmos.com/t/new-feature-share-script-variables-between-components/34/1 "2018-04-24T05:50:11Z")

</div>

Hey all! There’s a new CL feature.

If you define a variable in a script for one component (say, a graph component `c1`),  
`message = when c1.number("a") > 0 "positive" otherwise "negative or 0"`

You can now refer to it from other components (say, a note component `c2`),  
`content: c1.script.message`
