Cette page n'est pas encore disponible en français, sa traduction est en cours. Si vous avez des questions ou des retours sur notre projet de traduction actuel, n'hésitez pas à nous contacter.
This rule in JavaScript ensures that the code you write is actually used. An unused expression is a piece of code that is evaluated but the result is not used or assigned to a variable. These expressions do not have any effect on the program and can lead to confusion, making the code harder to read and understand.
To avoid unused expressions, always ensure that the result of each expression is either assigned to a variable, used in a larger expression, or used as an argument to a function.