Declaration / Declare

By: Dusty Arlia
Published on Friday, March 22, 2013, 05:54 PM
Last Updated on Tuesday, July 07, 2015 at 8:20 PM
Total Updates: 3

When you are working with variables in programming, you must declare them. What this means is you have to reserve a spot in memory to store the value for that variable. When you declare a variable you create a name for the spot in memory. You don't necessarily have to assign a value to the variable right away. You can just declare that variable first and then initialize (or assign a value to the variable) later. Here is an example of a JavaScript variable being declared:

var first_name;

Besides declaring variables, you can also declare functions.

Comments:

Ad: