class User {
constructor(username, password) {
this.username = username;
this.password = password;
}
}
const bd = [];
function addUser(username = '', password = '') {
if(username.length <= 0 && password.length <= 0) return;
bd.push(new User(username, password))
}
addUser('Login', 'password')
addUser()
addUser('Login2', 'password2')
console.log(bd)