# Variables Use Cases

Explore the practical application of variables for various use cases. Learn how to effectively use different variable scopes and data types, predefined variables, and how these work in various triggers and responses. Experience the prototypes firsthand by trying them out and downloading them to observe the interactions.

Find the use case you need below:

Looking for formula-specific use cases? Check out the use cases involving formulas.

Find tips, tricks, and solutions about variables and formulas that other users have shared before in our communities.

## Bunny vs. Wolf Game

Create variables to keep track of the score in a Bunny vs. Wolf game prototype.

Try the prototype yourself.

## Range Slider

Link the position of the handle with a range of values. As you drag and move the handle, the latest value is stored in a variable.

Try the prototype yourself.

## Using Data Elsewhere

Store the input from the input layer in a variable, and use it elsewhere, e.g., in a different scene. Think of names, passwords, email addresses, etc., that a user would enter and you want to use throughout the prototype.

Try the prototype yourself.

## Calculating the Remaining Balance

Calculate the remaining balance when doing a bank transfer. To do the actual calculation, use arithmetic operations subtracting the transfer amount from the current balance.

Try the prototype yourself.

## Remembering What's in the Shopping Cart

Add items to the shopping cart, and calculate and display the total amount in the shopping cart dynamically—depending on what items were added.

Try the prototype (made by Soda Design) yourself.

## Timer

After every 60 seconds, the timer adds another minute—just like any basic timer does. However, you can create any timer you like. The opposite, a countdown timer, is possible too.

Try the prototype yourself.

Distinguish an upward and downward scroll and adjust the position of the sticky header accordingly—all using a single predefined variable: \$touchVelocityY.

Try the prototype yourself.

## Enabling a Keyboard View

When the keyboard appears from the bottom, move your designs based on the keyboard height. Do these calculations automatically using the predefined variable \$keyboardHeight.

Try the prototype yourself.