Skip to content

Commit 05b2e8b

Browse files
committed
l12
1 parent ce0920a commit 05b2e8b

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

public/app.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,14 @@ var Invoice = /** @class */ (function () {
77
this.amount = a;
88
}
99
Invoice.prototype.format = function () {
10-
return this.client + " owes \u00A3" + this.amount + " for " + this.details;
10+
return "".concat(this.client, " owes \u00A3").concat(this.amount, " for ").concat(this.details);
1111
};
1212
return Invoice;
1313
}());
1414
var invOne = new Invoice('mario', 'work on the mario website', 250);
1515
var invTwo = new Invoice('luigi', 'work on the luigi website', 300);
16+
console.log(invOne);
17+
console.log(invTwo);
1618
var invoices = [];
1719
invoices.push(invOne);
1820
invoices.push(invTwo);

src/app.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ class Invoice {
44
details: string;
55
amount: number;
66

7-
constructor(c: string, d: string, a: number){
7+
constructor(c: string, d: string, a: number) {
88
this.client = c;
99
this.details = d;
1010
this.amount = a;
@@ -17,6 +17,8 @@ class Invoice {
1717

1818
const invOne = new Invoice('mario', 'work on the mario website', 250);
1919
const invTwo = new Invoice('luigi', 'work on the luigi website', 300);
20+
console.log(invOne);
21+
console.log(invTwo);
2022

2123
let invoices: Invoice[] = [];
2224
invoices.push(invOne)

0 commit comments

Comments
 (0)