Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript string contains


function longestString() {
 var longest = ' ';
for (var i=0; i < arguments.length; i++) {
  if(arguments[i].length > longest.length) {
    longest = arguments[i];
  }
}
return longest;
 

}

console.log(longestString("asda", "asdasdasd", "12311","akjsdgkjagsdkjagkjdgkajsgdkjas"));
Source by learn.coderslang.com #
 
PREVIOUS NEXT
Tagged: #javascript #string
ADD COMMENT
Topic
Name
9+5 =