Computer Programming for Beginners | Variables & Constants | Ep23 @Avelx
Computer Programming for Beginners | Variables & Constants | Ep23  @Avelx
Uploaded August 2016 | Updated September 2026, 2 weeks ago
Can we work with data randomly floating around? The answer is no we can’t! We need a referencing system to reference data when needed.

Variables and constants are containers to contain and act like a storage system for data. We reference data stored in these containers by giving them a name. Once labeled that container name can be referenced providing the data within the container.

Variables vary in value, hence the name variable. Constants are consistent, once set they cannot vary their value in anyway. If you try to change a constants’ value your program will error. In other words you can look but you can’t touch!

With different programming languages you have strictly and loosely typed languages. Strictly and loosely refer to how your variable’s can be set. Note constants can only be set once so strictly or loosely typed has nothing to do with constants, only variables.

In strictly typed programming languages variables can be strictly limited to certain datatypes. Meaning the value can vary but the data type cannot.

For example strictly typed languages state specifically a datatype that is allowed be assigned to that variable. Lets say I have a variable that can only accept the datatype of integer. This means the variable can have a different value, but not a different data type. So in this example I could have a different integer to be assigned to my variable. However assigning a string would error because we’ve strictly prohibited the variable to only accept integers, by trying to assign the different datatype of string our program will refuse.

However loosely typed languages will allow my variable’s to contain differing values and datatypes; so both can change. Now I can create a variable that contains an integer of 100. Then I’d like to assign the string “hello world”. This is allowed in a loosely typed language where the value has changed but also the datatype has changed to a string.

RECAP

1. Variables and constants are containers with names so we can reference data stored within them.
2. Variables vary in value.
3. Constants must be set and they're not allowed to be changed.
4. Loosely typed languages allow variableness of values and datatype.
5. Strictly typed languages allow for variableness of only the value but NOT the datatype.

Programming 101 course:
youtube.com/playlist?list=PLGC-hHIh7l5s6Spz86OT1u0A7kvQH-2B0

This tutorial is brought to you by avelx.co.uk - Coding tutorials to help you grow.
Computer Programming for Beginners | Variables & Constants | Ep23Javascript Tutorial | Understanding the Document Object Model in JSJavascript Tutorial | Scope & Closures | Ep20$WHACKD crypto currency up 700%, did John Mcafee get $WHACKD!?!?Javascript Tutorial | Objects in JS | Ep4Windows Wifi TestingJavascript Tutorial | JS Syntax | Ep5Unserialize filteringOSX iOS SimulationNamespacing, use and group use declarations in PHPComputer Programming for Beginners | Learn to Code | Ep1Objects
Programming With Avelx |

Computer Programming for Beginners | Variables & Constants | Ep23

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER