Documente Academic
Documente Profesional
Documente Cultură
JavaScript Operadores
Los operadores aritméticos se utilizan para realizar operaciones aritméticas con números:
Operator Description
+ Addition
- Subtraction
* Multiplication
INSTITUTO EMILIANI SOMASCOS
Cursos: Programación Estructurada
6to. Computación “A”
Instructor: Oscar Méndez
/ Division
% Modulus (Remainder)
++ Increment
-- Decrement
= x=y x=y
+= x += y x=x+y
-= x -= y x=x-y
*= x *= y x=x*y
/= x /= y x=x/y
%= x %= y x=x%y
La adición de dos números, devolverá la suma, pero la adición de un número y una cadena
devolverá una cadena:
Operator Description
== equal to
!= not equal
? ternary operator
Operator Description
|| logical or
! logical not
Operator Description
Operator Description
+ Addition
- Subtraction
* Multiplication
/ Division
% Modulus (Remainder)
++ Increment
-- Decrement
Operaciones aritmeticas
= x=y x=y
+= x += y x=x+y
-= x -= y x=x-y
*= x *= y x=x*y
/= x /= y x=x/y
%= x %= y x=x%y
^= x ^= y x=x^y
|= x |= y x=x|y
**= x **= y x = x ** y