Horje
javascript find the longest string in array Code Example
javascript return longest string in array
 function data(str){
           var show = str.split(" ");
            show.sort(function (a,b){
                return b.length - a.length; 
            })
            return show[0];
      }
      console.log(data(str = "javascript is my favourite language "));
javascript find the longest string in array
Math.max(...(x.map(el => el.length)));




Javascript

Related
ternary operator javascript Code Example ternary operator javascript Code Example
arange Code Example arange Code Example
array from javascript Code Example array from javascript Code Example
in compare method why we taking a and b for sorting in javascript Code Example in compare method why we taking a and b for sorting in javascript Code Example
Uncaught TypeError: $.ajax is not a function Code Example Uncaught TypeError: $.ajax is not a function Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7