SOURCE

var a = 1;
var b = 5;
/*if(a==4){
    document.write("输出"+a);
};*/

/*if(a==4){
    document.write("输出"+a");
}else{
    document.write("a不等于4");
};*/

/* 
if(a<4){
    document.write("输出"+a)
}
)
*/
/*
function isInteger(num) {
    result(parseFloat(num)==parseInt(num));
    
    // 判断数是否是整数

    return result;
}

var num=15;
//判断15是否是整数
if (isInteger(num)) {
    document.write("15 is an integer." + "<br/>");
}else{
    document.write("15 is not an integer." + "<br/>");
}

var num=15.51;
//判断15.15是否是整数 
if (isInteger(num)) {
    document.write("15 is an integer." + "<br/>");
}else{
    document.write("15 is not an integer." + "<br/>");
}
*/
function findDaffodi(num){ 
    document.write("Print daffiodil number: "+"</br>");
    for(var num=100;num<1000;num++){
        var unitsDigit = num %10;
        var tensDigit = parseInt((num/10)%10);
        var hundredsDigit = parseInt(num/100);
        var a=unitsDigit*unitsDigit*unitsDigit;
        var b=tensDigit*tensDigit*tensDigit;
        var c=hundredsDigit*hundredsDigit*hundredsDigit;
        if(num==(a+b+c))
        {
            document.write(num+"<br/>");
        }
    }
}
findDaffodi();
console 命令行工具 X clear

                    
>
console