/**
 * Given a list of words, find the target word and return its index.
 * If the target word is not found, return -1.
 */
fun findWordInList(wordList: List<String>, targetWord: String): Int {

    for ((index, word) in wordList.withIndex()) {
        if (word == targetWord) {
            return index
        }
    }
    
    // Add your code here to implement a break statement:
    // The break statement will exit the for loop prematurely if the target word is found.
    // If the target word is not found, the for loop will continue iterating until the end of the list.
    // If the for loop completes without finding the target word, return -1.
    
    return -1
}
/**
 * Given a list of words, find the target word and return its index.
 * If the target word is not found, return -1.
 */
fun findWordInList(wordList: List<String>, targetWord: String): Int {
/**
 * Given a list of words, find the target word and return its index.
 * If the target word is not found, return -1.
 */
fun findWordInList(wordList: List<String>, targetWord: String): Int {

    for ((index, word) in wordList.withIndex()) {
        if (word == targetWord) {
            return index
        }
    }
    
    // Add your code here to implement a break statement:
    // The break statement will exit the for loop prematurely if the target word is found.
    // If the target word is not found, the for loop will continue iterating until the end of the list.
    // If the for loop completes without finding the target word, return -1.
    
    return -1
}