Skip to content

Latest commit

 

History

History
24 lines (17 loc) · 571 Bytes

string-ends-with.md

File metadata and controls

24 lines (17 loc) · 571 Bytes

String ends with? 7 Kyu

LINK TO THE KATA - STRINGS FUNDAMENTALS

Description

Complete the solution so that it returns true if the first argument(string) passed in ends with the 2nd argument (also a string).

Examples:

solution('abc', 'bc') // returns true
solution('abc', 'd') // returns false

Solution

const solution = (str, ending) => str.endsWith(ending)