/**
 * You are working as a graphic designer and you have been given a task to remove duplicates from a list.
 *
 * Your task is to complete the 'removeDuplicates' function that takes in two arguments:
 * 1. originalList: A list containing elements with potential duplicates.
 * 2. newList: An empty list to store the elements from 'originalList' without any duplicates.
 *
 * Your function should remove all duplicates from 'originalList' and populate 'newList' with the elements in the same order as they appear in 'originalList'.
 *
 * Note:
 * - The order of the elements in 'newList' should match the order in which they first appeared in 'originalList'.
 * - You are not allowed to use built-in functions like 'toSet()' or 'distinct()' for this exercise.
 */
fun removeDuplicates(originalList: List<Any>, newList: MutableList<Any>) : List<Any> {

    for (item in originalList) {
        if (!newList.contains(item)) {
            newList.add(item)
        }
    }
    return newList
}
/**
 * You are working as a graphic designer and you have been given a task to remove duplicates from a list.
 *
 * Your task is to complete the 'removeDuplicates' function that takes in two arguments:
 * 1. originalList: A list containing elements with potential duplicates.
 * 2. newList: An empty list to store the elements from 'originalList' without any duplicates.
 *
 * Your function should remove all duplicates from 'originalList' and populate 'newList' with the elements in the same order as they appear in 'originalList'.
 *
 * Note:
 * - The order of the elements in 'newList' should match the order in which they first appeared in 'originalList'.
 * - You are not allowed to use built-in functions like 'toSet()' or 'distinct()' for this exercise.
 */
fun removeDuplicates(originalList: List<Any>, newList: MutableList<Any>) : List<Any> {
/**
 * You are working as a graphic designer and you have been given a task to remove duplicates from a list.
 *
 * Your task is to complete the 'removeDuplicates' function that takes in two arguments:
 * 1. originalList: A list containing elements with potential duplicates.
 * 2. newList: An empty list to store the elements from 'originalList' without any duplicates.
 *
 * Your function should remove all duplicates from 'originalList' and populate 'newList' with the elements in the same order as they appear in 'originalList'.
 *
 * Note:
 * - The order of the elements in 'newList' should match the order in which they first appeared in 'originalList'.
 * - You are not allowed to use built-in functions like 'toSet()' or 'distinct()' for this exercise.
 */
fun removeDuplicates(originalList: List<Any>, newList: MutableList<Any>) : List<Any> {

    for (item in originalList) {
        if (!newList.contains(item)) {
            newList.add(item)
        }
    }
    return newList
}