Chubb interview question

Javascript basic question Project related question