Understanding variables

In the field of computer-science, a variable is a symbolic name associated with a value that can change during the execution of a program. According to Wikipedia, variables represent memory-address locations where data is stored. These identifiers allow software-engineers to manipulate information using human-readable names rather than hexadecimal addresses.

Different programming-languages implement variables in various ways. For instance, statically-typed languages like java and c++ require a variable to be declared with a specific data-type. In contrast, dynamically-typed languages such as python and javascript allow the data-type to be determined at runtime, as detailed in the MDN Web Docs. The scope of a variable defines where it can be accessed within the source-code, often categorized into global-scope and local-scope.