A function may return a value; In this usage, how can this function be re-written to return the value of the user option('chosenOption', when an change event is called) and bind the value to currentLevel. Right now the currentLevel will return undefined to the console when the user choose an option, but we need it to return to the console the value of the chosen option.
let optionValues = document.querySelector('#dlevel');
function startGame(){
let chosenOption = optionValues.value;
return chosenOption;
}
let CurrentLevel = optionValues.addEventListener('change', startGame)
console.log(CurrentLevel);
<select name="" id="dlevel">
<option value="2">Avance</option>
<option value="3">Intermediate</option>
<option value="5">Beginner</option>
</select>