Misconceptions

Here are a couple of misconceptions. Many more to come...

Misconception Count Does Not Imply Language Difficulty

The 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.

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

Stay up-to-date

Follow us on  twitter to hear about new misconceptions.