Dojo Interview Question

Write a function that takes a string input, removes all duplicate characters while preserving the original order, and returns the cleaned string. For example, "programming" should become "progamin".