Apricode Interview Question

Mainly basic JavaScript tasks and one pseudo code question