Arbisoft interview question

Basic to advanced concepts of JS