Initial commit

Co-Authored-By: kotte <14197736+mrtamagotchi@users.noreply.github.com>
Co-Authored-By: mikaeltellhed <2311083+mikaeltellhed@users.noreply.github.com>
Co-Authored-By: Tore Knudsen <18231882+torekndsn@users.noreply.github.com>
Co-Authored-By: Michael Cartner <32543275+michaelcartner@users.noreply.github.com>
This commit is contained in:
Eric Tuvesson
2023-09-05 12:08:55 +02:00
commit 53f0d6320e
2704 changed files with 76354 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
---
hide_title: true
hide_table_of_contents: true
title: Noodl.Variables
---
# Noodl.Variables
Variables are the simplest form of global data model in Noodl. You can learn more about variables in the [guide](/docs/guides/data/variables). You can access all variables in your application trough the `Noodl.Variables` object. Changing a variable will trigger all connections to be updated for all **Variable** nodes in your project with the corresponding variable name.
<div className="ndl-image-with-background xl">
![](/javascript/reference/variables/variables.png)
</div>
```javascript
// This will change the variable named MyVariable
// and trigger all variable nodes in your project
Noodl.Variables.MyVariable = "Hello";
// Use this if you have spaces in your variable name
Noodl.Variables["My Variable"] = 10;
Noodl.Variables.userName = "Mickeeeey";
// Reading variables
console.log(Noodl.Variables.userName);
```