-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathq16.js
30 lines (25 loc) · 988 Bytes
/
q16.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
let guest=[
'Rukhe',
'Romiasa',
'Naba',
'Sana'
]
for (let i =0; i < guest.length; i++){
console.log(`Hey ${guest[i]}, please come to dinner at my home`)
}
console.log('--------------------****************-----------------------')
console.log('Unfortunately, Romaisa cannot make it to our dinner :(')
console.log('--------------------****************-----------------------')
guest.splice(1,1, 'Hadiqa')
for (let i =0; i < guest.length; i++){
console.log(`Hey ${guest[i]}, please come to dinner at my home`)
}
console.log('--------------------****************-----------------------')
console.log('Hey guys, We have now found a bigger dinner table :D')
console.log('--------------------****************-----------------------')
guest.unshift('Huda') //add at te start
guest.splice(3,0, 'Hania')//add in the middle
guest.push('Aimen')//add at the end
for (let i =0; i < guest.length; i++){
console.log(`Hey ${guest[i]}, please come to dinner at my home`)
}