-
Notifications
You must be signed in to change notification settings - Fork 0
/
2_number_string.html
37 lines (32 loc) · 1.16 KB
/
2_number_string.html
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
37
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<script type="text/javascript">
//alert(1.2);
//alert(2*8);
console.log(2*8);
console.log(Math.pow(3,2));
console.log(Math.pow(10,10));
console.log(Math.round(5.6));
console.log(Math.floor(10.2));
console.log(Math.sqrt(9));
console.log(Math.random() * 100);
console.log(Math.log(10));
console.log(Math.log10(8));
console.log('작은 따옴표');
console.log("큰 따옴표");
console.log('\'작은따옴표\'');
console.log("이건 줄바꾸기 예제이지롱.\njs도 결국 똑같다.");
console.log("문자열 더하기" + " 더해졌다.");
console.log("lenght함수".length);
//indexOf는 문자열 찾기. 없으면 -1
console.log("sadjhjkfhjsahfjshdjkahsd".indexOf("c"));
console.log("sadjhjkfhjsahfjshdjkahsd".indexOf("d"));
console.log(typeof 1);
console.log(typeof "1");
</script>
</body>
</html>