0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

○未満の数値を表示する方法

Posted at

備忘録のため記述します。

  <script>
     var data = [59, 39, 100, 2, 15, 40, 84, 97];

    /* 以下に課題処理を追加 */
    var i =0;
    for (i=0; i< data.length; i++){
        document.write("<div>"+data[i]+"</div>");
    }
     
    var count =0; //人数の把握をします
    var j =0;
    for (j=0; j<data.length; j++) {
        if (data[j]< 40) {
            count++
        }
    }
    document.write("<div>40点未満の人は"+count+"人です</div>");
    

</script>
0
0
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?