Pergunta de entrevista da empresa ServiceNow

coding question was leetcode easy about arrays, OOP, Java vs. JavaScript