GlobalLogic interview question

2 easy dsa question . js fundamentals