-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
115 lines (77 loc) · 1.72 KB
/
index.js
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
let x = 3;
console.assert(x>2,"it doesnt work");
// this will print only if false is passed
let ahmad = "saad";
let asad ="saaaaaad";
console.log({ahmad,asad});
//print this like an object
let ahmad = "saad";
let asad ="saaaaaad";
let ww = [{
"sad":2,
"re":45
},{
"sad":2,
"re":45
}]
let s = ["a","b","c"];
console.table({ahmad,asad});
console.table([ahmad,asad]);
console.table(w)
console.table(s)
console.table(ww)
//print in table
let w = {
"sad":2,
"re":45
}
console.log(w)
console.dir(w)
//print the object in nice way
console.time("hi");
let x=0;
for(let i=0;i<10000;i++){
x++;
}
console.timeLog("hi");
for(let i=0;i<10000;i++){
x++;
}
console.timeEnd("hi");
//use time inside javascript
function sad(){
console.trace("so what");
}
sad();
//print where its called and where its defined
console.error("hi")
console.warn("da");
//new way of print with colors
console.log("%c hi hello welcome","color:red; background-color: blue;")
//print with cusstom style
// %i for integer
// %s for string
// %o for object
// %f for folat
console.log("%i this is integer, %s this is a string, %o this is object, %f this is float",23,"hi",{sad:2},2.33)
//to emded printing in console.log
console.groupCollapsed("hi");
console.log("sub and like")
console.log("sub and like")
console.log("sub and like")
console.log("sub and like")
console.log("sub and like")
console.log("sub and like")
console.log("sub and like")
console.log("sub and like")
console.log("sub and like")
console.groupEnd("");
console.log("sub and like")
for(let i = 0;i<10;i++){
console.count('test');
}
console.count("test");
console.count("test");
console.count("test");
console.count("tes");
console.count("test");