-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlesson8_builtIN.html
More file actions
63 lines (51 loc) · 1.6 KB
/
lesson8_builtIN.html
File metadata and controls
63 lines (51 loc) · 1.6 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>Getting Started wiht JAVA Script</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
</head>
<body>
<script>
const first = 'this is a string';
const second = String('this is a string')
console.log('smallstring'.toUpperCase());
console.groupCollapsed("PrimitivesToObjects");
console.log(first === second);
console.log(
typeof first,
typeof String('this is a string'),
typeof new String()
);
console. groupEnd();
const sentense = 'this is my sentence';
console.groupCollapsed('String')
console.log(first.toUpperCase());
console.log(second.toLowerCase());
console.log(sentense.startsWith('this is'));
console.log('B'.repeat(5));
console.groupEnd();
console.groupCollapsed('Numbers');
console.log((1).toString());
console.log(1..toString());
console.log(Number.isInteger(5));
console.log(Number.isInteger(5.4));
console.log(1.5467);
console.log((1.5467).toFixed(2));
console.log(
Math.random(),
Math.ceil(4.56),
Math.floor(4.56)
);
console.groupEnd();
const myArr = ['chris', 'nick', 'holly'];
console.group("Arrays");
console.log(myArr.length);
console.log(myArr.join('-'));
console.log(myArr.push('ado'), myArr);
console.log(myArr.pop('ado'), myArr);
myArr.forEach((user) => console.log(user));
console.groupEnd();
</script>
</body>
</html>