This excerpt is from my app.js file for a mini express app I'm working on.
var loginPost = function()
user = {
username: $('#username').val(),
password: $('#password').val(),
};
$.ajax({
url: 'http://localhost:3000/login',
method: "POST",
dataType: 'json',
data: user
}).done(function(data) {
console.log(data.username+"login successful");
user = Cookies.get("loggedinId");
wishForm()
});
};
I am encountering an uncaught syntax error on the line where it says user = {, but I can't seem to find anything wrong with it. Any clues or suggestions would be greatly appreciated. Thank you.