# Introduction In this lab, we will explore how to check if a given string ends with a substring of another string using JavaScript. We will use a `for...in` loop and `String.prototype.slice()` to get each substring of the given `word`, starting at the end. Then, we will use `String.prototype.endsWith()` to check the current substring against the `text`. By the end of this lab, you will have a solid understanding of how to use these string methods to find matching substrings in JavaScript.
Click the virtual machine below to start practicing