I am working on a project where I need to select three random values from an array and display them in a new array on my website. It is important that each value is only selected once.
Here is what I currently have:
var students = ["Hans", "Ole", "Nils", "Olav", "Per", "Knut", "Line", "Pia"];
var pick = students[Math.floor(Math.random() * students.length)];
I am considering adding an id to my HTML so that the new array can be displayed on the website, but I am uncertain about the next steps.