Skip to content

Commit a87680e

Browse files
studying classes
1 parent 50ca5fb commit a87680e

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

classes.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
class Matematica {
2+
soma(valorA , valorB) {
3+
return valorA + valorB;
4+
}
5+
subtracao(valorA , valorB) {
6+
return valorA - valorB;
7+
}
8+
}
9+
10+
var instanciaMatematica = new Matematica();
11+
12+
var resultado = instanciaMatematica.soma(30,5);
13+
14+
console.log(resultado);

0 commit comments

Comments
 (0)