window.onload = function onLoad() {
  getVolunteeringOpportunities();
};

/**
 * Add the volunteering opportunities to the event card.
 */
async function getVolunteeringOpportunities() {
  const response = await fetch('/event-volunteering-data');
  const opportunities = await response.json()
  for (const key in opportunities) {
    console.log(opportunities[key].name);
    console.log(opportunities[key].numSpotsLeft);
    $('#volunteering-opportunities')
        .append(getInputFieldForOpportunity(
            opportunities[key].name, opportunities[key].numSpotsLeft,
            opportunities[key].requiredSkills));
  }
}

/**
 * Return a string for a list HTML element representing an opportunity.
 * @param name name of opportunity
 * @param numSpotsLeft number of spots left for opportunity
 * @param requiredSkills required skills for opportunity
 * @return {string}
 */
function getInputFieldForOpportunity(name, numSpotsLeft, requiredSkills) {
  requiredSkillsString = requiredSkills.length ? requiredSkills.toString() : "None";
  return `<li class="list-group-item">
          <p class="card-text">Volunteer Name: ${name}</p>
           <p class="card-text">Volunteer Spots Left: ${numSpotsLeft}</p>
           <p class="card-text">Required Skills: ${requiredSkillsString}</p></li>`;
}
@@ -285,16 +285,17 @@
 e.json()
+;
 %0A  for (
@@ -324,35 +324,27 @@
 ties) %7B%0A    
-console.log
+if 
 (opportuniti
@@ -349,71 +349,34 @@
 ties
-%5Bkey%5D.name);%0A    console.log(opportunities%5Bkey%5D.numSpotsLeft);%0A
+.hasOwnProperty(key)) %7B%0A  
     
@@ -408,16 +408,18 @@
 ities')%0A
+  
         
@@ -459,32 +459,34 @@
 ty(%0A            
+  
 opportunities%5Bke
@@ -531,32 +531,34 @@
 ft,%0A            
+  
 opportunities%5Bke
@@ -578,16 +578,22 @@
 ills));%0A
+    %7D%0A
   %7D%0A%7D%0A%0A/
@@ -676,16 +676,25 @@
 * @param
+ %7Bstring%7D
  name na
@@ -720,16 +720,25 @@
 * @param
+ %7Bstring%7D
  numSpot
@@ -790,30 +790,26 @@
  @param 
-requiredSkills
+%7Bstring%5B%5D%7D
  require
@@ -952,16 +952,20 @@
 ills
-String =
+Text =%0A     
  req
@@ -1017,14 +1017,14 @@
 ) : 
-%22
+'
 None
-%22
+'
 ;%0A  
@@ -1244,16 +1244,23 @@
 ills: $%7B
+%0A      
 required
@@ -1265,22 +1265,20 @@
 edSkills
-String
+Text
 %7D%3C/p%3E%3C/l
@@ -1283,8 +1283,10 @@
 /li%3E%60;%0A%7D
+%0A%0A

Fix style.