-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path01_index.html
More file actions
36 lines (30 loc) · 919 Bytes
/
01_index.html
File metadata and controls
36 lines (30 loc) · 919 Bytes
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
31
32
33
34
35
36
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<title>HTML Intro Test</title>
</head>
<script>
//Boolean, Number, String, Array, Object 5가지타입
var b = new Boolean(true); // var b = true ;
var n = new Number(3); //var n = 3 ;
var s = new String("hello javascript world"); //var s ="hello" or var s = 'hello' ;
var arr = new Array(); //var arr =[] ;
var obj = new Object(); //var obj ={} ;
//alert('hello javascript world!!') ;
var a ="heoll javascript world"; // = new String("heoll javascript world")
var x =new Number(3)
var y = 4 ; //var y =new Number(4)
//alert('x+y:'+ x+y) ;
alert(x+y) ;
var z ;
z=3 ; //이걸빼면 undefined
alert(typeof z) ;
alert(z) ; //undefined
//if(z=="undefined") -- error
//if(z==undefined) -- ok
</script>
<body>
<h1>여러분을 환영합니다!!</h1>
</body>
</html>