JS Variables and Use Strict Mode

Published on: July 22, 2016

Welcome to the fifth Easy JavaScript Tutorial, Beginner JavaScript Tutorial, part of Easy Programming! In this tutorial, we take a look at variables in JavaScript. What are variables?  How do you declare them? What types of variables are there? 

In this tutorial, I also speak about the 'use strict' option in JavaScript. It's a VERY useful option which can help save you a ton of time in the future. This quick tutorial will give you a great overview of how you can utilize variables to your benefit. 

A few things to keep in mind:

Variables are CASE SENSITIVE! 'car' does not equal to 'CAR'.

Variables cannot begin with a number! But they can contain numbers and special characters.

typeof(x) can be used to find the type of variable something is.

To fork the fiddle and follow along: https://jsfiddle.net/easyjs/dns0bk90/

Remember to checkout the Resources section below for associated downloadable content, JSFiddle links, and other resources. Watch the video and follow along!

Resources:



Comments: