Junior — Senior
Function to get an array without duplicate elements
livecode
Task condition
Create a function that takes an array (for example, inputArray) and returns a new array containing only the unique values from the original. The order of elements can be preserved or changed; the main thing is the absence of duplicates.
def unique_values(inputArray):
# function implementation
pass
function getUnique(arr) {
// function implementation
}
The function should work correctly with arrays of any data type, supporting both primitives and objects (when comparing objects, use their references).