No cache version.

Caching disabled. Default setting for this page:enabled (code LNG204)
If the display is too slow, you can disable the user mode to view the cached version.

Les opérateurs en JavaScript

Priorité des opérateurs en JavaScript 
()[]
--++!~-
*/%
+-
<<=>=>
==!=
^
|
&&||
?:
=+=-=*=/=%=<<=>>=&=^=|=
Opérateurs arithmétiques en JavaScript 
OpérateurNom
*Multiplication
/Division
+Addition
-Soustraction
Opérateurs logiques en JavaScript 
OpérateurNomDescriptionSyntaxe
||OU logiqueVérifie qu'une des conditions est réalisée((condition1)||(condition2))
&&ET logiqueVérifie que toutes les conditions sont réalisées((condition1)&&(condition2))
!NON logiqueInverse l'état d'une variable booléenne (retourne la valeur 1 si la variable vaut 0, 0 si elle vaut 1)(!condition)
Opérateurs d'incrémentation/décrémentation 
OpérateurNomDescriptionSyntaxe
++incrémentationAugmente d'une unité la valeur de la variablenom_variable ++
--décrémentationDiminue d'une unité la valeur de la variablenom_variable --
Opérateurs d'affectation 
OpérateurDescription
=Affectation de la valeur (située à droite du signe) à la variable (située à gauche)
+=Addition de deux valeurs et affectation du résultat à la variable
-=Soustraction de deux valeurs et affectation du résultat à la variable
*=Multiplication de deux valeurs et affectation du résultat à la variable
/=Division de deux valeurs et affectation du résultat à la variable
Opérateurs de comparaisons 
OpérateurDescription
==Egal Attention: à ne pas confondre avec l'opérateur d'affectation =
!= Différent
>Supérieur
>=Supérieur ou égal
<Inférieur
<= Inférieur ou égal

English translation

You have asked to visit this site in English. For now, only the interface is translated, but not all the content yet.

If you want to help me in translations, your contribution is welcome. All you need to do is register on the site, and send me a message asking me to add you to the group of translators, which will give you the opportunity to translate the pages you want. A link at the bottom of each translated page indicates that you are the translator, and has a link to your profile.

Thank you in advance.

Document created the 19/03/2002, last modified the 26/10/2018
Source of the printed document:https://www.gaudry.be/en/javascript-operateur.html

The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.