code block style test

2022. 6. 1. 23:28카테고리 없음

<!doctype html>
<html>
    <head>
        <meta charset="utf-8">
        <title>Loop</title>
    </head>
    <!--while(이 곳에는 boolean data가 들어오며, true일 경우 while문{}안의 코드를 반복실행한다.)
    따라서 ()안의 boolean값이 언제 false가 되는지 즉, 언제 종료될 것인지 지정하는 것이 필요하다.-->
    <body>
        <h1>Loop</h1>
        <script>
            document.write('<li>1</li>');
            var i = 0;
            while(i < 3) {
            document.write('<li>2</li>');
            document.write('<li>3</li>');
            i = i + 1;
            }
            document.write('<li>4</li>');
        </script>
    </body>
</html>

https://highlightjs.org/