The most viewed items
const tnwNums = [20, 29, 30, 39, 40, 47, 50, 70];
function tnwFun1(){
document.getElementById("demo").innerHTML = tnwNums.join(", ");
}
function tnwFun2(){
let result = tnwNums.slice(1, 4);
document.getElementById("demo").innerHTML = "The original is: " + tnwNums.join(", ");
document.getElementById("demo1").innerHTML = "The new array is: " + result.join(", ");
}
No comment to show.