function writeDocument(variable){ document.write(variable + "<br/>"); } var arr = ["HTML","CSS","JavaScript","jQuery","Vue.js"]; writeDocument(arr[2]); writeDocument(arr); arr[4] = "React.js"; writeDocument(arr); arr[5] = "Vue.js"; writeDocument(arr); arr[8] = "Angular.js"; writeDocument(arr);