No need for var choice = y.value;
… it is never going to be able to tell you all the choices. As you can see from the rest of your code when you print that variable it only contains the first selection.
Instead just replace:
x.innerHTML += "the language is, " + choice + "<br>";
with
x.innerHTML += "the language is, " + current.value + "<br>";
You are already checking each option for whether it is selected, so simply output the value of each option.
Cheers!
0
solved I want to add multiple selection in Javascript