上代码
只要 i 循环到可以被 7 整除的数就会被忽略
<script> let a=0; for (let i = 1; i <=100 ; i++) { if (i%7==0) { continue } a=a+i } console.log(a); </script>
标签:整数,continue,let,之外,100,整除 From: https://www.cnblogs.com/0722tian/p/17084817.html
只要 i 循环到可以被 7 整除的数就会被忽略
<script> let a=0; for (let i = 1; i <=100 ; i++) { if (i%7==0) { continue } a=a+i } console.log(a); </script>
标签:整数,continue,let,之外,100,整除 From: https://www.cnblogs.com/0722tian/p/17084817.html