function pickRandomExercise() {
  // make an array out of the localStorage object
  var keys = Object.keys(localCatalog);

  // generate a random number within the range of elements localCatalog
  var rand = Math.floor(Math.random() * keys.length);

  // set the object property based on above random number
  var prop = keys[rand];

  // output the property's name and reps
  output.exercise = localCatalog[prop].name;
  output.reps = localCatalog[prop].reps;
}
// chooses a random exercise and sets value to global 'output' var
chooses a random exercise and sets value to global 'output' var
chooses a random exercise and sets value to global ' output ' var
function pickRandomExercise() {
  var keys = Object.keys(localCatalog);
  var rand = Math.floor(Math.random() * keys.length);
  var prop = keys[rand];
  output.exercise = localCatalog[prop].name;
  output.reps = localCatalog[prop].reps;
}
function pickRandomExercise ( ) { var keys = Object . keys ( localCatalog ) ; var rand = Math . floor ( Math . random ( ) * keys . length ) ; var prop = keys [ rand ] ; output . exercise = localCatalog [ prop ] . name ; output . reps = localCatalog [ prop ] . reps ; }
chooses a random exercise and sets value to global 'output' var
chooses a random exercise and sets value to global ' output ' var
// make an array out of the localStorage object // generate a random number within the range of elements localCatalog // set the object property based on above random number // output the property's name and reps