-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathq19.js
More file actions
23 lines (19 loc) · 681 Bytes
/
q19.js
File metadata and controls
23 lines (19 loc) · 681 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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('_______________________________________________________')
let size = guest.length;
console.log('I am inviting '+size + ' people to dinner')