function assignDifficultyToUser(){

  var difficultyElement = document.getElementsByName('mode');
  for (var i=0; i<difficultyElement.length; i++) {
    if(difficultyElement[i].checked){
      //Assign to User Object;
    }
  }
}
// -Target HTML name = 'mode' where the difficulty will be chosen
Target HTML name = 'mode' where the difficulty will be chosen
Target HTML name = ' mode ' where the difficulty will be chosen
function assignDifficultyToUser(){
  var difficultyElement = document.getElementsByName('mode');
  for (var i=0; i<difficultyElement.length; i++) {
    if(difficultyElement[i].checked){
    }
  }
}
function assignDifficultyToUser ( ) { var difficultyElement = document . getElementsByName ( 'mode' ) ; for ( var i = 0 ; i < difficultyElement . length ; i ++ ) { if ( difficultyElement [ i ] . checked ) { } } }
Target HTML name = 'mode' where the difficulty will be chosen
Target HTML name = ' mode ' where the difficulty will be chosen
//Assign to User Object;