break达到某个条件跳出(中断)循环
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script>
// break和continue直接的区别
/*
break达到某个条件跳出(中断)循环
*/
for(var i=0;i<=6;i++){
console.log(i);
if(i==3){
break;
}
}
console.log("hello")
</script>
</body>
</html>