What Are Variables in Coding?
Why Do We Use Variables?
Store Information: Ā Variables help us remember things while we code. Change Values: Ā We can update whatās inside the variable whenever we need. Organize Data: Ā Using variables makes our code neat and easy to read.
Types of Variables
Numbers: Ā These are variables that store numerical values. For example,Ā .age = 10 Text: Ā These variables hold words or sentences. For example,Ā .name = "Alice" Boolean: Ā This type can only be true or false. For example,Ā .isHappy = true
How to Create a Variable
Choose a name for your variable (likeĀ ).favoriteColor Decide what value you want to store (likeĀ ).favoriteColor = "blue" Now you can useĀ favoriteColor Ā in your code whenever you need to!
Fun Activity: Create Your Own Variables!
Your favorite food Your best friendās name A fun number (like your age or how many pets you have)


