04-04-2023, 07:41 AM
Code:
const fruits1 =
[
"Banana",
"Orange",
"Apple",
"Mango"
];
document.getElementById("demo1").innerHTML = fruits1.fill("Kiwi");
const fruits2 =
[
"Banana",
"Orange",
"Apple",
"Mango"
];
document.getElementById("demo2").innerHTML = fruits2.fill("Kiwi", 2, 4);