//find a big length friend from array in javascript or finding longest string in array in javascript
function bigFrnd(names){
bigFrnd = names[0];
for(var i=0;i<names.length;i++){
if(bigFrnd.length<names[i].length){
bigFrnd = names[i];
}
}
return bigFrnd;
}
var frnds = ['John','Justin','Messi',"Doe",'Mike','Chester','Kim'];
console.log(bigFrnd(frnds))