/**
 * Given a list of journalist names and a list of their corresponding locations,
 * this function prints the journalist name and their location using a while loop.
 */
fun intersectionOfWhileLoopAndTupleAccess(journalistNames: List<String>, locations: List<String>) {

    // Initialize the index
    var index = 0

    // Iterate while the index is less than the length of the names list
    while (index < journalistNames.size) {
        // Access the name and location at the current index
        val journalistName = journalistNames[index]
        val location = locations[index]

        // Print the name and location
        println("Journalist: $journalistName, Location: $location")

        // Increment the index
        index++
    }
}
/**
 * Given a list of journalist names and a list of their corresponding locations,
 * this function prints the journalist name and their location using a while loop.
 */
fun intersectionOfWhileLoopAndTupleAccess(journalistNames: List<String>, locations: List<String>) {
/**
 * Given a list of journalist names and a list of their corresponding locations,
 * this function prints the journalist name and their location using a while loop.
 */
fun intersectionOfWhileLoopAndTupleAccess(journalistNames: List<String>, locations: List<String>) {

    // Initialize the index
    var index = 0

    // Iterate while the index is less than the length of the names list
    while (index < journalistNames.size) {
        // Access the name and location at the current index
        val journalistName = journalistNames[index]
        val location = locations[index]

        // Print the name and location
        println("Journalist: $journalistName, Location: $location")

        // Increment the index
        index++
    }
}