Glassdoor Interview Question

Sort user inputs depending of the values, and display in DOM