Something along these lines should work. Below is my attempt at putting your code back in:
var allShows = ['Bones', 'Psych', 'Big Bang Theory', 'Mad Men', 'Breaking Bad', 'Modern Family', 'Game of Thrones', 'Dexter'];var currentShow = allShows[0]; //Just to initialize // Filter out the one you have selectedfunction getAvailableShows() { return allShows.filter(function(e) { return e !== currentShow })}function playClicked() { // make a pool - current one playing var availableShows = getAvailableShows(); // choose one from random var show = availableShows[Math.floor(Math.random() * availableShows.length)]; // update current show currentShow = show; // updae text this.tekst.text = show;}this.knapp.addEventListener("click", playClicked.bind(this));
Here's a code pen showing that it works via console log. https://codepen.io/easement/pen/MbNwdw