-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpractise.js
66 lines (41 loc) · 1.26 KB
/
practise.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
let arr1= [1, 2, 3, 4]
let arr2 = ['kuldeep', 'shiv', 'nilesh']
console.log('arr1:', arr1.length)
// console.log('arr1:', arr1[2])
// console.log('arr1:', arr1.includes(4))
// console.log('arr1:', arr1.indexOf(2))
// console.log('arr6:', arr1.push(6))
// console.log('arr1:', arr1)
// console.log('arr6:', arr1.pop())
// console.log('arr7:', arr1.push(...arr2))
// console.log('arr1:', arr1)
// console.log('arr1:', arr1.shift())
// console.log('arr1:', arr1)
// console.log('arr1:', arr1.unshift("Taku"))
// // console.log('arr1:', arr1.filter((el, index)=> index< 3))
// console.log('arr1:', arr1.find((el)=> el>1))
// console.log('arr1:', arr1.flat())
console.log("Hello")
// console.log('arr1:', arr1.concat(arr2))
// console.log('arr1:', arr1.join(" "))
// console.log('arr1:', arr1.reduce((acc, el)=> acc+el))
// console.log('arr1:', arr1.reverse)
// console.log('arr1:', arr2.slice(0, 1))
// setTimeout(()=>{
// let a= 10;
// let b= 20;
// console.log(a+b)
// }, 2000)
// setTimeout(()=>{
// let a= 10;
// let b= 20;
// console.log(a*b)
// }, 1000)
// setTimeout(()=>{
// for (let i=0; i<=20; i=i+2)
// console.log(i)
// }, 2000)
// let int = setInterval(()=>{
// console.log("India")
// }, 2000)
// clearInterval(int)