SOURCE

for(var i=0;i<5;i++){
    document.write(i+"<br/>");
}

var score = 40;
if (score < 60) {
document.write("不及格"+ "<br/>");
} 
else {
document.write("及格"+ "<br/>");
}

function isInteger(num){
    var result=false;
    if (parseInt(num)==parseFloat(num)){
        result=true;
    }else{
        result=false;
    }
    return result;
}
if(isInteger(15)){
    document.write("15 is an integer."+"<br/");
}

function printDaffodiNum(){
    document.write("print daffiodi number:"+"<br/>");
    for(var num=100;num<1000;num++){
        var unitsDigit=num%10;//个位数
        var tensDigit=parseInt(num/10)%10;/*十位数*/
        var hunsDigit=parseInt(num/100);/*百位数*/

        var u=unitsDigit*unitsDigit*unitsDigit;
        var t=tensDigit*tensDigit*tensDigit;
        var h=hunsDigit*hunsDigit*hunsDigit;
        //如果是水仙花数,则打印
        if(num==u+t+h){
            document.write(num+"<br/>");
        }
    }
}
printDaffodiNum();

var gender = "女";
var height = 172;
if(gender=="男"){
    if(height>180){
        document.write("高个子男生"+ "<br/>");
    }else{
        document.write("矮个子男生"+ "<br/>");
    }
}else if (height > 170){
    document.write("高个子女生"+ "<br/>");
}else{
    document.write("矮个子女生"+ "<br/>");
}
console 命令行工具 X clear

                    
>
console