{"size": 505, "ext": "js", "max_stars_repo_path": "src/transaction.js", "max_stars_repo_name": "Patrick-Sawyer/bank-tech-test", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/transaction.js", "max_issues_repo_name": "Patrick-Sawyer/bank-tech-test", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/transaction.js", "max_forks_repo_name": "Patrick-Sawyer/bank-tech-test", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 18.7037037037, "max_line_length": 42, "alphanum_fraction": 0.4376237624}
class Transaction {
  constructor(date, amount, balance) {
    this.date = date;
    this.amount = amount;
    this.balance = balance;
  }
  print() {
    if (this.amount < 0) {
      return (
        this.date +
        " || || " +
        Math.abs(this.amount).toFixed(2) +
        " || " +
        this.balance.toFixed(2)
      );
    } else {
      return (
        this.date +
        " || " +
        this.amount.toFixed(2) +
        " || || " +
        this.balance.toFixed(2)
      );
    }
  }
}
