티스토리 뷰

문자열

    <title>문자열</title>

    <script>
        //문자가 아니라 문자열 !! 
        var str = "가나다라마바사";
        console.log(str);
        console.log(str + 'ABCDEFG');
        console.log(str + '\n \tABCDEFG\"');


    </script>
</head>

 

 

숫자

    <title>숫자</title>

    <script>

        var num = 123;
        console.log("num=" + num);
        console.log("num=" + num + 1000); //1231000
        console.log("num=" + (num +1000)); //1123


    </script>
</head>

 

댓글