JSFiddle - React, Tailwind, and code Playground

by ktstowell

HTML

<h1><a href="http://projecteuler.net/problem=4">Problem:</a></h1>
<p>
A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 99.
</p>

<p>Find the largest palindrome made from the product of two 3-digit numbers.</p>
<hr />
<div id="pal"></div>

JavaScript

(function(doc, undef){
    var ceil = 99,
        floor = 9,
        x1 = ceil,
        x2 = ceil,
        cnt,
        prd;
    
    (function outer() {
        cnt = 1;
        while(x1 > floor && x2 > floor) {
            prd = (x1-cnt) * (x2-cnt);
        }
    })();
        
})(document);