Skip to content

Commit 26bd823

Browse files
incorrect suffix check
1 parent 653a991 commit 26bd823

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

CWE20/main.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
const endsWith = (x, y) => {
2+
return x.lastIndexOf(y) === x.length - y.length
3+
}
4+
5+
endsWith('x', 'xx')

0 commit comments

Comments
 (0)