Misconceptions

These are the misconceptions we collected so far in:

Misconception Count Does Not Imply Language Difficulty

There is no connection between the number of misconceptions listed here and the difficulty of the corresponding programming language. The effort we spent on collecting misconceptions is very different for different languages. It would be inappropriate to reason about the quality of languages based on the number of misconceptions in this collection.

AccessingInexistentPropertyError
JavaScript
DRAFT
AccessingInexistentPropertyError
Accessing a non existent property on an object produces an error
ArrowFunctionNoImpliedReturn
JavaScript
DRAFT
ArrowFunctionNoImpliedReturn
Even when an arrow function consists just of an expression, the return keyword must be explicitly written
ArrowFunctionRequiresFunctionKeyword
JavaScript
DRAFT
ArrowFunctionRequiresFunctionKeyword
Arrow functions also require the keyword 'function'
AssignmentCopiesObject
JavaScript
AssignmentCopiesObject
Assignment copies the object
CallbackParametersInCaller
JavaScript
DRAFT
CallbackParametersInCaller
Parameters of a callback function may be written as parameters of the caller function
CharType
JavaScript
DRAFT
CharType
A single character is of type char
ClassDefinesType
JavaScript
ClassDefinesType
The type of an object is equivalent to the type defined by its class definition
ConditionalOperatorNotExpression
JavaScript
DRAFT
ConditionalOperatorNotExpression
The conditional operator is not an expression
ConstDeclarationCanBeLeftUninitialized
JavaScript
DRAFT
ConstDeclarationCanBeLeftUninitialized
Declarations of constants do not need to be immediately initialized
ConstReferenceImpliesImmutability
JavaScript
ConstReferenceImpliesImmutability
An object referred to by a const variable is an immutable object
EqualityOperatorComparesObjectsValues
JavaScript
DRAFT
EqualityOperatorComparesObjectsValues
The equality operator compares two objects' values
EqualityOperatorComparesOnlyTypes
JavaScript
DRAFT
EqualityOperatorComparesOnlyTypes
The equality operator '==' compares only the types of the operands
FunctionAsValueWithParentheses
JavaScript
DRAFT
FunctionAsValueWithParentheses
To use a function as a value, one needs to have parentheses after its name
FunctionOverloading
JavaScript
DRAFT
FunctionOverloading
It is possible to create multiple functions with the same name but with different signatures
FunctionsCannotBeImmediatelyInvoked
JavaScript
DRAFT
FunctionsCannotBeImmediatelyInvoked
Functions cannot be called in the expression in which they are defined
FunctionsMustBeNamed
JavaScript
DRAFT
FunctionsMustBeNamed
Every function definition requires an associated name
IdentifierAsStringInBracketNotation
JavaScript
DRAFT
IdentifierAsStringInBracketNotation
An identifier used to access a property with the bracket notation is treated as a string
MandatoryAssignment
JavaScript
DRAFT
MandatoryAssignment
An expression must be assigned to have a valid statement
MapInPlace
JavaScript
DRAFT
MapInPlace
Map modifies the elements of the array on which it operates in place
NoAtomicExpression
JavaScript
NoAtomicExpression
Expressions must consist of more than one piece
NoBracketNotationForObjects
JavaScript
DRAFT
NoBracketNotationForObjects
Square brackets cannot be used to access properties of an object
NoFunctionCallsChaining
JavaScript
DRAFT
NoFunctionCallsChaining
It is not allowed to chain function calls
NoGlobalObject
JavaScript
DRAFT
NoGlobalObject
There isn't a global object
NoReturnValue
JavaScript
DRAFT
NoReturnValue
Functions without return statements return no value at all
NullAndUndefinedAreTheSame
JavaScript
DRAFT
NullAndUndefinedAreTheSame
The values null and undefined are the same
NullIsObject
JavaScript
NullIsObject
null is an object
NumberOfParametersMatchArguments
JavaScript
DRAFT
NumberOfParametersMatchArguments
Functions must be called with the same number of arguments as defined in their signature
ObjectAsParameterIsCopied
JavaScript
DRAFT
ObjectAsParameterIsCopied
Objects are passed by value
PrototypesAreClasses
JavaScript
DRAFT
PrototypesAreClasses
JavaScript is based on a class-based object model
SetTimeout0IsSynchronous
JavaScript
DRAFT
SetTimeout0IsSynchronous
Scheduling the execution of a function after 0 milliseconds with setTimeout is equivalent to a synchronous call
SetTimeoutReturnsCallbackResult
JavaScript
DRAFT
SetTimeoutReturnsCallbackResult
SetTimeout returns the value returned by the callback function
StringRepetitionOperator
JavaScript
DRAFT
StringRepetitionOperator
One can repeat a String by multiplying it with a number
ThisAssignable
JavaScript
ThisAssignable
One can assign to this
TypeofArrayIsArray
JavaScript
DRAFT
TypeofArrayIsArray
The typeof operator applied on an array returns 'array'
TypeofNullIsNull
JavaScript
DRAFT
TypeofNullIsNull
The value null is of type 'null'

Stay up-to-date

Follow us on  twitter to hear about new misconceptions.