Skip to content

Commit

Permalink
Operadores Aritmeticos
Browse files Browse the repository at this point in the history
  • Loading branch information
JackDev21 committed Feb 2, 2024
1 parent 8277dc3 commit d7bfde1
Showing 1 changed file with 31 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// Operadores Aritmeticos
let a, b, c, d, e, f;

// Suma
a = 3 + 4;
console.log(a);

// Resta
b = 6 - 2;
console.log(b);

// Multiplicacion
c = a * 2;
console.log(c);

// Division
d = b / 2.5;
console.log(d);
console.log(typeof d);

// Modulo (residuo de la division)
f = 9 % 2;
console.log(f);

// Potencia (ES2016 - ECMAScript 2016)
e = 2 ** 3; // 2 * 2 * 2 = 8
console.log(e);

e = Math.pow(2,3);
console.log(e);

0 comments on commit d7bfde1

Please sign in to comment.