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.

Authoritative Definition

Wikipedia does not necessarily offer the best fitting definition of a concept. The exact meaning we attribute to the concept of Value is based on principled authoritative sources such as:

Misconceptions about Value
26 documented Misconceptions

Check Yourself
Misconception
AssignmentCopiesObjectPython
Assignment copies the object
Misconception
CallbackParametersInCallerJavaScript
Parameters of a callback function may be written as parameters of the caller function
Misconception
EqualityOperatorComparesListIdentitiesScratch
(list a) = (list b) compares the identities of list a and list b
Misconception
EqualityOperatorComparesObjectsValuesJava
o==p compares the objects referred to by variables o and p
Misconception
EqualityOperatorComparesObjectsValuesJavaScript
The equality operator compares two objects' values
Misconception
EqualityOperatorComparesOnlyTypesJavaScript
The equality operator '==' compares only the types of the operands
Misconception
EqualityOperatorComparesOnlyTypesScratch
() = () compares only the types of its operands
Misconception
EqualsComparesReferencesJava
o.equals(p) compares the references stored in the variables o and p
Misconception
ExpressionsDynamicallyTypedJava
One has to evaluate an expression to determine its type
Misconception
FunctionAsValueWithParenthesesJavaScript
To use a function as a value, one needs to have parentheses after its name
Misconception
LocalVariablesAutoInitializedJava
Local variables are automatically initialized
Misconception
MultiValueVariableJava
A variable can contain more than one value
Misconception
MultipleValuesReturnPython
Functions can return multiple values
Misconception
MustInitializeFieldInConstructorJava
Constructors must assign values to all fields
Misconception
NoCastIfSameSizeJava
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
Misconception
NoReturnValueJavaScript
Functions without return statements return no value at all
Misconception
NullAndUndefinedAreTheSameJavaScript
The values null and undefined are the same
Misconception
NullIsObjectJava
null is an object
Misconception
NullIsObjectJavaScript
null is an object
Misconception
PrimitiveIsObjectJava
Primitive values are heap objects
Misconception
PrimitiveVariablesDynamicallyTypedJava
The type of a primitive variable depends on its value
Misconception
TypeofNullIsNullJavaScript
The value null is of type 'null'
Misconception
UseOfSelfTypeImpliesRecursiveTypeJava
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
Misconception
VariablesHoldExpressionsPython
= stores an expression: it stores a reference to the expression in a variable
Misconception
VariablesHoldObjectsPython
A variable contains a whole object
Misconception
VoidMethodReturnsValueJava
A method with void return type can return a value

Stay up-to-date

Follow us on  twitter to hear about new misconceptions.