-
Notifications
You must be signed in to change notification settings - Fork 1
/
js.js
42 lines (39 loc) · 847 Bytes
/
js.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
let str1 = 'hello';
let str2 = 'owu';
let str3 = 'com';
let str4 = 'ua';
let num1 = 1;
let num2 = 10;
let num3 = -999;
let num4 = 123;
let num5 = 3.14;
let num6 = 2.7;
let num7 = 16;
let bool1 = true;
let bool2 = false;
console.log(str1);
console.log(str2);
console.log(str3);
console.log(str4);
console.log(num1);
console.log(num2);
console.log(num3);
console.log(num4);
console.log(num5);
console.log(num6);
console.log(num7);
console.log(bool1);
console.log(bool2);
// Об'єднання ПІБ
let firstName = 'John';
let middleName = 'Doe';
let lastName = 'Smith';
let person = firstName + ' ' + middleName + ' ' + lastName;
console.log(person);
// Визначення типів змінних
let a = 100;
let b = '100';
let c = true;
console.log(typeof a); // number
console.log(typeof b); // string
console.log(typeof c); // boolean