Problem Solving On Coding Platforms in JS

Can anyone explain that How to solve problems in given format on HackerEarth Platform using JAVASCRIPT? I am bit confused with their predefined functional parameters.