Easy10 min
Remove Duplicates
Remove duplicate values from the array, preserving the order of first appearance.
Your function
Implement solve(value, extra) in JavaScript. Return the answer; printing alone does not count as a result.
Examples
Input:
[[1,1,2]]Output:
[1,2]Input:
[[3,2,3,1]]Output:
[3,2,1]Constraints
Input contains at most 1,000 values or characters. Numbers are finite integers. Inputs follow the structure shown in the examples.