Welcome to the sixth Easy JavaScript Tutorial, Beginner JavaScript Tutorial, part of Easy Programming! In the last tutorial, we went over storing information in variables. In this tutorial, we take a look at storing two other types of information into variables. They are DOM elements and Functions. Know how, why, and when to do this will allow you to save a lot of time when coding. I will cover all three questions in this tutorial.
What you learn in this tutorial is something that we will do over and over again because it makes the life of any coder easier. One of the directives of programming is to create reusable code, and storing DOM elements and Functions in variables is a very good way to create reusable code. I hope this very quick tutorial helps you get started. Please return for a tutorial on functions!
To fork the fiddle and follow along: https://jsfiddle.net/easyjs/2c91k5ut/
Remember to checkout the Resources section below for associated downloadable content, JSFiddle links, and other resources. Watch the video and follow along!