-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patharray.js
More file actions
34 lines (24 loc) · 966 Bytes
/
array.js
File metadata and controls
34 lines (24 loc) · 966 Bytes
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
const country= 'Bangladesh';
const age= 22;
const isIndefendent= true;
const student= {id: 1212, class: 10, name: 'sayem'};
const friends= [12, 52, 50, 63, 25, 85, 66, 89, 54];
function add(num1, num2){
return num1 + num2;
}
console.log(typeof country);
console.log(typeof age);
console.log(typeof isIndefendent);
console.log(typeof student);
// type of is not found the array below the right system------------------------
console.log(Array.isArray(friends));
console.log(typeof add);
// ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
console.log(friends.includes(50));
console.log(friends.includes(53));
if(friends.indexOf(256) !== -1){
}
// concat-------------------------mane array add kora join kora
const newfriendsAge= [33, 44, 11, 7, 9];
const allfriends=newfriendsAge.concat(friends);
console.log(allfriends);