Assignment
To assign means to store a value in a variable.
Related concepts: ValueVariable
Closest Wikipedia entry: Assignment (computer science) — In computer programming, an assignment statement sets and/or re-sets the value stored in the storage location(s) denoted by a variable name; in other words, it copies a value into the variable. In most imperative programming languages, the assignment statement (or expression) is a fundamental construct. Today, the most commonly used notation for this operation is x = expr (originally Superplan 1949–51, popularized by Fortran 1957 and C).
Misconceptions about Assignment16 documented Misconceptions
Check YourselfAssignCompares — Java
= compares two valuesAssignCompares — Python
= compares two valuesAssignmentCopiesObject — Java
Assignment copies the objectAssignmentCopiesObject — JavaScript
Assignment copies the objectAssignmentCopiesObject — Python
Assignment copies the objectAssignmentNotExpression — Java
An assignment a=b is not an expressionConstDeclarationCanBeLeftUninitialized — JavaScript
Declarations of constants do not need to be immediately initializedExpressionAssigns — Java
An expression that reads a variable also updates its value after the evaluationExpressionAssigns — Scratch
An expression that reads a variable also updates its value after the evaluationLocalVariablesAutoInitialized — Java
Local variables are automatically initializedMandatoryAssignment — JavaScript
An expression must be assigned to have a valid statementMustInitializeFieldInConstructor — Java
Constructors must assign values to all fieldsThisAssignable — Java
One can assign to thisThisAssignable — JavaScript
One can assign to thisVariablesHoldExpressions — Java
= stores an expression in a variableVariablesHoldExpressions — Python
= stores an expression: it stores a reference to the expression in a variable