forked from mouredev/hello-javascript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path26-console-methods.js
More file actions
80 lines (54 loc) · 1.33 KB
/
26-console-methods.js
File metadata and controls
80 lines (54 loc) · 1.33 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
/*
Clase 42 - Console
Vídeo: https://youtu.be/1glVfFxj8a4?t=20444
*/
// Console
// log
console.log("Hi World!!")
// error
console.error("your girfriend is a bitch")
console.error("your girfriend is a bitch", new Error("end of relationship"))
// warn
console.log("this is a warning message")
// info
console.info("This is an information message")
//
let data = [
["Daniel", 36],
["Andrea", 33]
]
console.table(data)
let gliderPilot = [
{name:"Madabeski", Glider:"bibeta6"},
{name:"Caldas", Glider:"Delta 4"},
{name:"Julian", Glider:"Epsilon 9"},
{name:"Daniel", Glider:"Swift 5"},
{name:"Teto", Glider:"Iota 2"},
]
console.table(gliderPilot)
// group
console.group("Car: ")
console.log("Medel: Hammer")
console.log("Brand: GMC")
console.log("Color: Blue")
console.groupEnd()
// time para medir el tiempo de ejecucion de un bloque de codigo
console.time("time2")
console.time("time")
for (let i = 0; i < 100; i++) {
}
console.timeEnd("time")
for (let i = 0; i < 100; i++) {
}
console.timeEnd("time2")
// assert
let age = 17
console.assert(age > 18, "User must be older")
// count
console.count("Click")
console.count("Click")
console.count("Click")
// trace
console.trace("Following your code")
// clear
//console.clear()