Next freebie in 28 Hours*
Variables are the building blocks of the programming world. Take any programming language and the basic elements, the building blocks, will be variables. You can also think of variables as buckets which can store data. When we move further along in this course you will get to know variables a lot better as our usage of them increases. .
STRING: Strings are where we can store any copy -- it can be a name, an address etc, any text. We will explore and learn more about strings in a later video. Here is an example:
var strAddress = “2929 White House Way”;
NUMBER: if the name doesn't give it away, here is a hint: it has something to do with numbers! This data type stores numeric digits of any kind (real, integers, negatives and positives.) Throughout the next few videos we will apply various Math operations on numbers. Here's a fast example:
var nMonth = 12;
BOOLEAN variables which can either be "true" or "false." No other value can be contained in one. Look at this statement, "you broke this window." This can either be true or false: that’s what the Boolean data type is used for. We store true or false information in it and it's usually used for flags to check whether we should take a decision or not. Booleans will prove to be a great asset in your tool belt, about which we will learn as we progress in this course. Here's a fast example:
var isBroken = false;
Have a question but don't want to ask it publicly? If you are a prime member just ask right here and we will get back to you within 48 hours. Not prime yet? no worries you can ask publicly below.