function solution(digits){
  var array = digits.split("");

  var largest = 0;

  for(var i=0; i<array.length-4; i++){
    var num = Number(array.slice(i, i+5).join(""));
    console.log("num", num);
    if(num > largest){
      largest = num;
    }
  }



  return largest;
  
}
// The input will be a string of only digits.  
The input will be a string of only digits.
The input will be a string of only digits .
function solution(digits){
  var array = digits.split("");
  var largest = 0;
  for(var i=0; i<array.length-4; i++){
    var num = Number(array.slice(i, i+5).join(""));
    console.log("num", num);
    if(num > largest){
      largest = num;
    }
  }
  return largest;
}
function solution ( digits ) { var array = digits . split ( "" ) ; var largest = 0 ; for ( var i = 0 ; i < array . length - 4 ; i ++ ) { var num = Number ( array . slice ( i , i + 5 ) . join ( "" ) ) ; console . log ( "num" , num ) ; if ( num > largest ) { largest = num ; } } return largest ; }
The input will be a string of only digits.
The input will be a string of only digits .