Exercise
Let’s take a quick breather to try out setting variables ourselves. Head over to your browser and open up the JavaScript developer console. On Google Chrome this can be done by going to: view > developer > JavaScript console
Then you will see the following pane open up.
Now carry out the following steps:
You should see the console repeat your assigned value back to you. If you don’t see this, read through the above code again and repeat these steps until you do see your assigned value repeated back to you.
Now we can start to have some real fun with JavaScript. Let’s take a look at operators. Operators are ways of carrying out an ‘operation’ (or a task) on our data. So, for example, we can use the + operator to add numbers together like so: