UNPKG

matematicabisao83

Version:

Um exemplo de projeto node com operações matemáticas

20 lines (16 loc) 663 B
var call_counter = require('./contadorDeChamadas') function add(x, y){ call_counter(); return x + y; } function subtract(x, y){ call_counter(); return x - y; } // This module exports two functions, so an object is created to provide access to these functions. In this case, // the addition method references the add function, whereas the subtraction method references the subtract function. It’s more // typical for the method name to be the same as the function name, but this example demonstrates that they can be different. module.exports = { addition: add, subtraction: subtract }