Variables Part 4 – Booleans

Boolean values are fairly simple, really—they can be either true or false. It’s probably easiest to think of a Boolean value as a switch that can either be on or off. They’re used mainly when we’re making decisions. Continue reading

Posted in Learning Javascript | Leave a comment

Variables Part 3 – Strings

A string is a series of characters of any length, from zero to infinity. Those characters could be letters, numbers, symbols, punctuation marks, or spaces—basically anything you can find on your keyboard. Continue reading

Posted in Learning Javascript | Leave a comment

Variables Part 2 – Numbers

In Part 1 we learned what a variable does and how to use it, in this post we will learn what the first of the different types of variables are that we can use.

In JavaScript, you can work with numbers, strings, Booleans, arrays and objects. JavaScript doesn’t care what your variables hold. A variable could start off holding a number, then change to holding a character, a word, or anything else you want it to hold. Continue reading

Posted in Learning Javascript | Leave a comment

Variables Part 1 – Storing Data

One of the first things to learn with any programming language is how variables work. Do you remember those maths classes at school where x=2 and y=3 bet you wondered when you would ever use algebra outside of those classes, well now’s your chance!

If you want your Javascript program to be able to take user input, and adapt to differnt pages and situations, you have to have some way of working with values that you don’t know in advance enter stage left the variable. Continue reading

Posted in Learning Javascript | 1 Comment