2022年11月2日 星期三

條件式判斷(使用IF)

 

 

var mark;

mark=window.prompt("enter a number: ",mark);

if (mark<60)
  document.write("Your mark is :"+mark+" You are failed");
else
  document.write("Your mark is :"+mark+" You are passed");

沒有留言:

張貼留言

迴圈處理(使用FOR)

    var i=1; for (i;i<=10;i=i+1)   document.write(i);