project/src/main/webapp/shared.js
/** Creates a properly-formatted volunteering opportunity string */
Creates a properly-formatted volunteering opportunity string
Creates a properly - formatted volunteering opportunity string
function buildVolunteers(opportunities) {
  let opportunityString = '';
  for (const opportunity of opportunities) {
    opportunityString += opportunity.name + ', ';
  }
  return opportunityString.slice(0, -2);
}
function buildVolunteers ( opportunities ) { let opportunityString = '' ; for ( const opportunity of opportunities ) { opportunityString += opportunity . name + ', ' ; } return opportunityString . slice ( 0 , - 2 ) ; }
Creates a properly-formatted volunteering opportunity string
Creates a properly - formatted volunteering opportunity string