From 7b6340e357e75a85fdd4d9b6fc3b158cb33a6ff9 Mon Sep 17 00:00:00 2001 From: qianguyihao Date: Thu, 26 Dec 2019 17:58:53 +0800 Subject: [PATCH] =?UTF-8?q?update:=20=E4=BC=98=E5=8C=96=E8=B4=A8=E6=95=B0?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 04-JavaScript基础/07-流程控制语句:循环结构(for和while).md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/04-JavaScript基础/07-流程控制语句:循环结构(for和while).md b/04-JavaScript基础/07-流程控制语句:循环结构(for和while).md index 27ff938..c5f0243 100644 --- a/04-JavaScript基础/07-流程控制语句:循环结构(for和while).md +++ b/04-JavaScript基础/07-流程控制语句:循环结构(for和while).md @@ -371,9 +371,10 @@ i的值:9 //console.log(i); //判断num是否能被i整除 if (num % i == 0) { - //如果num能被i整除,则说明num一定不是质数 - //设置flag为false + //一旦发现:如果num能被i整除,则说明num一定不是质数, + //此时:设置flag为false,然后跳出 for 循环 flag = false; + break; } }