0
const users ={
  nome: String,
  idade: Number,
  saldo: Number,
  aposta: ()=>{return dados}
};
const dados = {
  gama: String,
  investimento: Number,
  lucro: Number,
  totalRetorno: (investimento, lucro) =>{let total = investimento+lucro; return totalRetorno}
};
I’m trying to create a user
server.post('/users', (require, response) => {
  const { name, idade, saldo, aposta, game, investimento, lucro} = require.body; 
  users.push(name, idade, saldo, aposta(game, investimento, lucro));
  console.log("Usuario criado")
  return response.json(users, dados);
});
I can’t create user I don’t know why. ERROR: Typeerror: users.push is not a Function
But what would it be users for you to be giving
push?– LeAndrade
.push()is an array method,usersis an object.– Rafael Tavares