Skip to content

Instantly share code, notes, and snippets.

@peat-psuwit
Created December 27, 2016 16:01
Show Gist options
  • Save peat-psuwit/4f14e0428d44afb1b6e99bf6d2b021a0 to your computer and use it in GitHub Desktop.
Save peat-psuwit/4f14e0428d44afb1b6e99bf6d2b021a0 to your computer and use it in GitHub Desktop.
function find(obj) {
//what argument do I have?
console.log(obj);
}
var req = {
body: {
username: "peat",
password: "123456"
}
}
//What you're doing
find(req.body.username);
//What must be done
find({username: req.body.username});
find(req.body);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment