function vote(comment, upvote, commentUpvotes) { if (upvote == true) { commentUpvotes++; } else if (upvotes == false) { commentUpvotes--; }; } vote('foo', true, 9);