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)
Misconceptions about Value26 documented Misconceptions
Check YourselfEqualityOperatorComparesObjectsValues — Java
o==p compares the objects referred to by variables o and p
EqualsComparesReferences — Java
o.equals(p) compares the references stored in the variables o and p
ExpressionsDynamicallyTyped — Java
One has to evaluate an expression to determine its type
LocalVariablesAutoInitialized — Java
Local variables are automatically initialized
MultiValueVariable — Java
A variable can contain more than one value
MustInitializeFieldInConstructor — Java
Constructors must assign values to all fields
NoCastIfSameSize — 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 variable
NullIsObject — Java
null is an object
PrimitiveIsObject — Java
Primitive values are heap objects
PrimitiveVariablesDynamicallyTyped — Java
The type of a primitive variable depends on its value
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 type
VoidMethodReturnsValue — Java
A method with void return type can return a value
CallbackParametersInCaller — JavaScript
Parameters of a callback function may be written as parameters of the caller function
EqualityOperatorComparesObjectsValues — JavaScript
The equality operator compares two objects' values
EqualityOperatorComparesOnlyTypes — JavaScript
The equality operator '==' compares only the types of the operands
FunctionAsValueWithParentheses — JavaScript
To use a function as a value, one needs to have parentheses after its name
NoReturnValue — JavaScript
Functions without return statements return no value at all
NullAndUndefinedAreTheSame — JavaScript
The values null and undefined are the same
NullIsObject — JavaScript
null is an object
TypeofNullIsNull — JavaScript
The value null is of type 'null'
AssignmentCopiesObject — Python
Assignment copies the object
MultipleValuesReturn — Python
Functions can return multiple values
VariablesHoldExpressions — Python
= stores an expression: it stores a reference to the expression in a variable
VariablesHoldObjects — Python
A variable contains a whole object
EqualityOperatorComparesListIdentities — Scratch
(list a) = (list b) compares the identities of list a and list b
EqualityOperatorComparesOnlyTypes — Scratch
() = () compares only the types of its operands