자바스크립트 반복문 제어
JS

자바스크립트 반복문 제어

by nocagklhw 2020. 1. 12.
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
</body>
<script>
    for(var i = 0; i<10; i++) {
        if(i === 5) {
            break;
        }
        document.write("sdfsdf<br/>");
    }
</script>
</html>

댓글


TOP

TEL. 02.1234.5678 / 경기 성남시 분당구 판교역로