Interview set 1 JavaScript solution · HackerTrans