EPAM Systems interview question

Basic core vanila java script