var UsersData = [];
var UsersObj = {id: i = 0, name: '', email: ''};
function AddUser (i, name, email) {
UsersData.push(i++, name, email);
}
function AddUser (i, name, email) {
UsersData.push({
id: i,
name: name,
email: email
});
}
//....
AddUser(3, "Vasya", "vasya@mail.ru");