{"size": 409, "ext": "js", "max_stars_repo_path": "Module2/JavaScript/JavaScript-Fund/8.Functions/5.LargerThanNeighbours.js", "max_stars_repo_name": "darindragomirow/TelerikAcademy", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "Module2/JavaScript/JavaScript-Fund/8.Functions/5.LargerThanNeighbours.js", "max_issues_repo_name": "darindragomirow/TelerikAcademy", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "Module2/JavaScript/JavaScript-Fund/8.Functions/5.LargerThanNeighbours.js", "max_forks_repo_name": "darindragomirow/TelerikAcademy", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 19.4761904762, "max_line_length": 63, "alphanum_fraction": 0.4474327628}
function solve(args)
{
    function isLarger(array)
   {
            let counter=0;
            for(let i=1;i<array.length-1;i+=1)
            {

             if(+array[i]>+array[i-1] && +array[i]>+array[i+1])
             counter+=1;
            }
            return counter;   
       
   }

   let N=+args[0];
   var array=args[1].split(' ');
   console.log(isLarger(array));
}

solve(['6','2 1 4 3 5 2']);