DigiValet Interview Question

Write some pseudo code in JavaScript