<script>
const colours = ["red", "green", "blue", "yellow", "magenta", "cyan", "white", "black"];
document.write ("<p>Original: " + colours + "</p>");
colours.sort();
document.write ("<p>sort: " + colours + "</p>");
colours.reverse();
document.write ("<p> reverse: " + colours + "</p>");
colours.push("Orange");
document.write ("<p>push: " + colours + "</p>");
colours.unshift("Purple");
document.write ("<p>unshift: " + colours + "</p>");
colours.pop();
document.write ("<p>pop: " + colours + "</p>");
colours.shift();
document.write ("<p>shift: " + colours + "</p>");
colour_names = colours.toString();
document.write ("<p>toString: " + colour_names + "</p>");
colour_names = colours.join("-");
document.write ("<p>join: " + colour_names + "</p>");
colours.splice (3, 3, "Goldenrod", "Crimson");
document.write ("<p>splice: " + colours + "</p>");
</script>