Altimetrik interview question

Write a function in javascript and display data without using for loop