Skip to content

Commit 7f3875a

Browse files
ends with exercise
1 parent 02ddab6 commit 7f3875a

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

7kyus/js/stringEndsWith.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
//2 arguments - both strings check?
2+
// returns boolean
3+
function solution(str, ending) {
4+
//todo
5+
return str.endsWith(ending);
6+
//todo
7+
//todo
8+
}
9+
10+
console.log(solution("abc", "bc")); // returns true
11+
console.log(solution("abc", "d")); // returns false
12+
console.log(solution("abcde", "cde")); //true
13+
console.log(solution("samurai", "ra")); //false

0 commit comments

Comments
 (0)