Value
A value is data and may be the result of evaluating an expression or the contents of a variable.
Related concepts: ValueEvaluationVariable
Closest Wikipedia entry: Value (computer science) — In computer science and software programming, a value is the representation of some entity that can be manipulated by a program. The members of a type are the values of that type. The "value of a variable" is given by the corresponding mapping in the environment.
Misconceptions about Value26 documented Misconceptions
Check YourselfAssignmentCopiesObject — Python
Assignment copies the objectCallbackParametersInCaller — JavaScript
Parameters of a callback function may be written as parameters of the caller functionEqualityOperatorComparesListIdentities — Scratch
(list a) = (list b) compares the identities of list a and list bEqualityOperatorComparesObjectsValues — Java
o==p compares the objects referred to by variables o and pEqualityOperatorComparesObjectsValues — JavaScript
The equality operator compares two objects' valuesEqualityOperatorComparesOnlyTypes — JavaScript
The equality operator '==' compares only the types of the operandsEqualityOperatorComparesOnlyTypes — Scratch
() = () compares only the types of its operandsEqualsComparesReferences — Java
o.equals(p) compares the references stored in the variables o and pExpressionsDynamicallyTyped — Java
One has to evaluate an expression to determine its typeFunctionAsValueWithParentheses — JavaScript
To use a function as a value, one needs to have parentheses after its nameLocalVariablesAutoInitialized — Java
Local variables are automatically initializedMultiValueVariable — Java
A variable can contain more than one valueMultipleValuesReturn — Python
Functions can return multiple valuesMustInitializeFieldInConstructor — Java
Constructors must assign values to all fieldsNoCastIfSameSize — Java
If a variable is at least as big (bit-width) as a value, then no cast is needed to a assign the value to the variableNoReturnValue — JavaScript
Functions without return statements return no value at allNullAndUndefinedAreTheSame — JavaScript
The values null and undefined are the sameNullIsObject — Java
null is an objectNullIsObject — JavaScript
null is an objectPrimitiveIsObject — Java
Primitive values are heap objectsPrimitiveVariablesDynamicallyTyped — Java
The type of a primitive variable depends on its valueTypeofNullIsNull — JavaScript
The value null is of type 'null'UseOfSelfTypeImpliesRecursiveType — Java
If a class has a method that has a local variable, parameter, or return value with the class as its type, the class is a recursive typeVariablesHoldExpressions — Python
= stores an expression: it stores a reference to the expression in a variableVariablesHoldObjects — Python
A variable contains a whole objectVoidMethodReturnsValue — Java
A method with void return type can return a value