I have a problem with the last line. Does someone know how to fix this code?
The “console” says: Uncaught SyntaxError: Unexpected token ‘;’.
Thanks
var userDatabase = [
{
username: "Admin",
password: "4444",
}
];
var newsfeed = [
{
username: "Max",
timeline: "Good Morning!",
},
{
username: "Alex",
timeline: "Have a cool day!",
}
];
var signUpName = prompt("Enter Username");
var signUpPassword = prompt("Enter Password");
function login(a, b) {
if (a === userDatabase[0].username && b === userDatabase[0].password) {
console.log(newsfeed);
} else {
alert("Wrong Details");
}
}
function login(signUpName, signUpPassword);