본문 바로가기

교육/2022 모각코 코뮤니티 2월과정 - js

모각코2월-JS-5일차-변수

html

<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title>five</title>
    </head>
    <body>
        <script src = "./five.js"></script>
        <button class="btn" onclick="btn()">click</button>
    </body>
</html>

js

var num=812;
var str="choicessu";
var bool=true;
var ob={value:5};
var un;
function btn(){
    console.log(typeof(num));
    console.log(typeof(str));
    console.log(typeof(bool));
    console.log(typeof(ob));
    console.log(typeof(un));
}

결과