-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript.js
204 lines (108 loc) · 3.21 KB
/
script.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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
/*
true;
console.log(true)
let animeIsFun =true;
console.log(animeIsFun);
console.log(typeof true);
console.log(typeof javascriptIsFun);
console.log(typeof animeIsFun);
console.log(typeof 'preetam');
animeIsFun = 'yes!';
console.log(typeof animeIsFun);
let emptiness ;
console.log(emptiness);
console.log(typeof emptiness);
emptiness = 00;
console.log(typeof emptiness);
let isIsland = false;
let language ;
console.log(typeof isisland );
console.log(typeof population );
console.log(typeof country );
console.log(typeof language );
console.log(typeof false);
//mathematical operators
const now = 2037;
const agefirst= now-2004;
const agesecond=now-2002;
console.log(agefirst);
console.log(agefirst*2,agefirst/2,9**4);
const firstName='Preetam';
const lastName='kumar';
console.log(firstName+' '+lastName);
// assignment operators
let x = 35*6;//210
x+=100//x=x+100//310
x/=5;
x++;
x--;
x--;
console.log(x);
//comparison operators
console.log(agefirst<agesecond);
console.log(agesecond>=28);
const isFullAge = agesecond>=28;
console.log()
let country = 'india';
let continent = 'asia';
let population = 1300 ;
console.log(country);
console.log(continent);
console.log(population);
console.log(population/2);
population++;
console.log(population);
const populationfinland = 6
console.log(population>populationfinland);
let description = 'Portugal is in Europe, and its 11 million people speak portuguese';
console.log(description);
const markMass = '95';
const markHeight = '1.88';
const johnMass = '85';
const johnHeight ='1.76';
markBMI = markMass / markHeight ** 2;
johnBMI = johnMass / johnHeight ** 2;
const firstNam = 'preet';
const job = 'clueless teenager';
const age = 18
const me = "I'm" + ' ' + firstNam + ' '+ ',an' + ' ' + age + 'years old ' + job ;
console.log(me);
const newMe = `I'm ${firstNam} ,an ${age} years old ${job}`;
console.log(newMe);
console.log(`hahahahahahahahahha!!!!shitasssjdsajj`);
console.log(`one piece is the best in big 3
then bleach comes second
og naruto comes a close third
and shippuden is eating shit in hell
that's my opinion bitches!!!!!!!!`)
const age = 12
const letLegalAge = age>=18 ;
const yearsLeft = 18 - age;
if(letLegalAge){
console.log('preetam can start learn to drive😄');
} else {
console.log(`preetam is not eligible to get a driving license🙃, wait another ${yearsLeft} years`);
}
if(){
}else{
}
const markBMI = 28.3;
const johnBMI = 23.9;
const bmim=28.3;
const bmij=23.9;
if(markBMI>johnBMI){
console.log(`mark's bmi(${bmim}) is higher than john's(${bmij}) !`)}
else{
console.log(`john's bmi(${bmij}) is higher than mark's(${bmim}) !`)
}
*/
// type cnversion
const year = '1997';
console.log(Number(year),year);
console.log(Number(year)+18);
console.log(String(56));
// type coversion
let n = '54'+1
n = n-1;
console.log(n);
// falsy values are values that area not exactly false but will become when we will try to convert them into booleans