Largest Palendrone

by Juan Alban Franco

HTML

<html>

<p id = out>

</html>

JavaScript

var i = 999;
var j = 999;
 var multiple = 0;
 var exit_bool;
multiple = j * i ;
if (pal(multiple) == 'true'){
	document.getElementById("out").innerHTML = multiple;
}else
	{
		while (i>=100){
	  	while(j>=100){
	    	if(pal(i*j)=='true'){
	      	document.getElementById("out").innerHTML = multiple;
	        return;
	       }else{j--}
	      }
	      i--;
	    }
	  }






function pal(test){
	//create string
  var string = '';
  console.log("here")
  var bool;
  string = test.toString();
  alert(string);

  for ( var i = 0 ; i <= string.length;i++){
  		console.log(string[i]);
  	 
     
     	bool = 'true';
     }else{bool = 'false'}
  }
  //alert(bool);
	return bool;
}