We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 638697a commit 88d0911Copy full SHA for 88d0911
Stack/stack.js
@@ -21,7 +21,7 @@ class Stack
21
22
pop() // Time Complexity O(1)
23
{
24
- if(this.count == 0) return undefined;
+ if(this.count === 0) return undefined;
25
26
let deleteItm = this.items[this.count - 1];
27
console.log(`${deleteItm} removed`)
@@ -41,8 +41,8 @@ class Stack
41
42
isEmpty()
43
44
- console.log(this.count == 0 ? 'Stack is empty' : 'Stack is NOT empty');
45
- return this.count == 0;
+ console.log(this.count === 0 ? 'Stack is empty' : 'Stack is NOT empty');
+ return this.count === 0;
46
}
47
48
// Stacks size
0 commit comments