-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
94 lines (83 loc) · 1.64 KB
/
index.js
File metadata and controls
94 lines (83 loc) · 1.64 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
80
81
82
83
84
85
86
87
88
89
90
91
// var name = "Ivaylo";
//
// let title = "Rush Hour";
// // console.log(title);
//
// title = "Rush Hour 2";
// // console.log(title);
//
// const ip_address_server_1415 = "192.168.0.1/255.255.255.0";
// // console.log(ip_address_server_1415)
//
// let array = [
// title,
// ip_address_server_1415,
// true
// ]
// // console.log(array)
//
// let object = {
// title: "Borat",
// ip_address_server_1415: "122.256.0.121/255.255.255.0"
// }
// // console.log(object)
// //cikli
// for (let i = 0; i < array.length; i++) {
// console.log(array[i]);
// }
//
// for (let element of array) {
// console.log(element);
// }
//
// let i = 0;
// while (i< array.length) {
// console.log(array[i]);
// i++;
// }
//
// //funkcii
// function func(){
// console.log("executed the function")
// }
// func();
//
// const secondFunction = () => {
// console.log("executed the function")
// }
// secondFunction();
//VTORO UPRAJNENIE
let data = [
10,
7,
25,
10,
56
]
// const modifiedArray = data.map((element)=> {
// if (element === 56) {
// element = 17;
// }
// return element;
// })
// console.log(modifiedArray);
// const modifiedArray = []
// for (let element of data) {
// if (element === 7) {
// element = 17;
// }
// modifiedArray.push(element);
// }
// console.log(modifiedArray);
// const filteredData = data.filter((element)=>{
// if (element <= 25) {
// return element;
// }
// })
// console.log(filteredData);
// const findData = data.find((element) => {
// if (element === 10) {
// return element;
// }
// })
// console.log(findData)