Forgot username/password? Don't have an account?
Login with Facebook
Home » Courses » JavaScript 101 » What are Variables?
Subscribe for updates.
* New to us? log in with Facebook and get a free day pass

JavaScript 101

  1. Intro (03:59)
  2. The Script Tag (04:26)
  3. OOP and DOM (02:45)
  4. What are Variables? (01:37)
  5. Strings (10:39)
  6. Creating Javascript Comments (00:52)
  7. Numbers (09:29)
  8. Boolean (09:10)

What are Variables?

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. .

Data type” mean the type of data (such as numbers or text) which we can use while programming. There are 3 primitive data types (we don't mean data painted on a cave wall by a Neanderthal!) Primitive means the most basic types which JavaScript stores in a special way to make retrieval as fast as possible. Complex data types, such as arrays or objects, take longer to store and retrieve – but they also contain more data. Primitives exist in almost every language. Here are the three JavaScript uses:

  1. 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”;

  2. 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;

  3. 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;

Coming up next..

In the next video we will begin playing with these data types while coding in JavaScript.

Got A Question?

'I love being Prime'

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.

Act now while we have available seating

Our on line school is private, affordable and interactive with trainer support.
Act now save your seat before someone else takes yours.
Act now