티스토리 뷰

(결과 출력)

 

(이용 코드)

document.write( ); ,  typeof

 

(소스 코드)

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>2022.01.04_JavaScript 실습</title>
    <script>
        document.write(2022);
        document.write('<br/>'+2022+'<br/>');
        document.write('Hello '+2022+'<br/>');

        document.write('<br/>-----구분선-----<br/><br/>');

        document.write(3+5+'<br/>');
        document.write('3 + 5 : '+(3+5)+'<br/>');

        document.write('<br/>-----구분선-----<br/><br/>');

        let num;
        num=5;

        document.write('type of num : '+ typeof num +'<br/>');

        num='Busan';
        document.write('type of num : '+ typeof num +'<br/>');
    </script>
</head>
<body>
    <h3>JavaScript Practice</h3>
</body>
</html>
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2025/06   »
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30
글 보관함