Skip to content

Commit 235c36f

Browse files
committed
Feat: fix changed property value to val
1 parent 4c20140 commit 235c36f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lesson_12/structs_ts/src/stack.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,21 @@ export class Stack {
88
this.top = undefined;
99
}
1010

11-
push(value: number): void {
12-
const newNode = new ListNode(value);
11+
push(val: number): void {
12+
const newNode = new ListNode(val);
1313
newNode.next = this.top;
1414
this.top = newNode;
1515
}
1616

1717
pop(): number | undefined {
1818
if (this.isEmpty()) return undefined;
19-
const value = this.top!.value;
19+
const val = this.top!.val;
2020
this.top = this.top!.next;
21-
return value;
21+
return val;
2222
}
2323

2424
peek(): number | null {
25-
return this.isEmpty() ? null : this.top?.value;
25+
return this.isEmpty() ? null : this.top?.val;
2626
}
2727

2828
isEmpty(): boolean {

0 commit comments

Comments
 (0)