Constant Examples

My name is Melissa and my last name is Eggert.

While constants and variables both store values temporarily, there are differences between the two. A constant is named with all caps, even though it's not required. Furthermore, constant do not begin with a dollar sign like variables do, as they are normally assigned a scalar value, such as a string or a number. A constant's value cannot be modified, unlike variables.