A web page that I made for checking the amount of possible 3 digit numbers using only the digits 1 - 6 in order of least to greatest doesn't load. I'm guessing it's from a mistake in the while loop I put in the code below. I've tried making something that returns the same value as a string of the object {a:4, b:5, c:6}, and it didn't work. I tried using the string 'a:4, b:5, c:6', and it didn't work.
var n = 0;
var o = {a:1, b:2, c:3};
var i = [o.a, o.b, o.c];
var s = i.sort(function(a, b) {
return a - b;
});
while (o != {a:4, b:5, c:6}) {
o.c++;
i = [o.a, o.b, o.c];
if (o.c = 7) {
o.c = 1;
o.b++;
}
if (o.b = 7) {
o.b = 1;
o.a++
}
if (i == s && o.a != o.b && o.a != o.c) {
n++;
document.getElementById('a').innerHTML = n;
}
}
Also, the question someone suggested is different from my question. I'm asking why the page isn't loading and how to fix the while loop, the other person suggested why two empty objects aren't the same.