function sendAnswer(terms, side) {

  let [ termA, termB, term1, term2 ] = terms;

  if (side == 'left') {
    chosen = [termA, term1, termB, term2];
    other  = [termA, term2, termB, term1];
  } else {
    chosen = [termA, term2, termB, term1];
    other  = [termA, term1, termB, term2];
  }

  const req = new XMLHttpRequest();

  req.open('POST', '/answer');
  req.setRequestHeader("Content-type", "application/x-www-form-urlencoded");

  req.onload = function() {
    if (req.status !== 200) {
      alert(`An error (${req.status}) occured.`);
    } else {
      const results = JSON.parse(req.response);

      addAnswer(terms, results, side);
    }
  };

  const chosenAnswer = chosen.join('-');
  const otherAnswer  = other.join('-');

  req.send(`chosen=${chosenAnswer}&other=${otherAnswer}`);
}

function renderTerms(terms) {
  let [ termA, termB, term1, term2 ] = terms;
  return `
    <div class="term" id="termA">${termA}</div>
    <div class="term" id="termB">${termB}</div>
    <div class="term" id="term1">${term1}</div>
    <div class="term" id="term2">${term2}</div>
  `;
}

function addAnswer(terms, results, side) {
  const answers = document.querySelector('#answers');
  const line = document.createElement('div');
  const chosenCount = parseInt(results.chosen);
  const totalCount = parseInt(results.total);
  const percent = Math.floor((chosenCount / totalCount) * 100);
  const success = (percent > 50);
  const result = success ? 'Well done' : 'Wrong';
  line.classList.add('line');

  line.innerHTML  = '<div class="round">X/10</div>';
  line.innerHTML += `<div class="terms ${side}Choice">` + renderTerms(terms) + '</div>';
  line.innerHTML += `<div class="score">${result}<br>Score: X/Y<br>On ${totalCount} players<br>${percent}% chose like you<br>&gt; The Google Truth</div>`;

  answers.insertBefore(line, answers.firstChild);
}

function displayQuestion() {

  fetch('/couples')
    .then(function(response) {
      return response.json();
    }).then(function(json) {

      const termA = json[0].firstTerm.en;
      const termB = json[0].secondTerm.en;
      const term1 = json[1].firstTerm.en;
      const term2 = json[1].secondTerm.en;

      const termsElement = document.querySelector('#terms');
      const termAElement = document.querySelector('#termA');
      const termBElement = document.querySelector('#termB');
      const termBResult  = document.querySelector('#termB');
      const term1Element = document.querySelector('#term1');
      const term2Element = document.querySelector('#term2');
      const leftZone     = document.querySelector('#leftZone');
      const rightZone    = document.querySelector('#rightZone');

      termAElement.innerHTML = termA;
      termBElement.innerHTML = termB;
      term1Element.innerHTML = term1;
      term2Element.innerHTML = term2;

      leftZone.addEventListener('mouseenter', function() {
        terms.classList.add('leftChoice');
      });
      leftZone.addEventListener('mouseleave', function() {
        terms.classList.remove('leftChoice');
      });
      rightZone.addEventListener('mouseenter', function() {
        terms.classList.add('rightChoice');
      });
      rightZone.addEventListener('mouseleave', function() {
        terms.classList.remove('rightChoice');
      });

      leftZone.addEventListener('click', function() {
        sendAnswer([termA, termB, term1, term2], 'left');
      });
      rightZone.addEventListener('click', function() {
        sendAnswer([termA, termB, term1, term2], 'right');
      });
    });
}

document.addEventListener('DOMContentLoaded', function() {

  displayQuestion();

})

@@ -1471,16 +1471,180 @@
 Wrong';%0A
+  const googleTruth = %60https://www.google.com/trends/explore#q=$%7Bterms%5B0%5D%7D $%7Bterms%5B2%5D%7D, $%7Bterms%5B0%5D%7D $%7Bterms%5B3%5D%7D, $%7Bterms%5B1%5D%7D $%7Bterms%5B2%5D%7D, $%7Bterms%5B1%5D%7D $%7Bterms%5B3%5D%7D%60;%0A
   line.c
@@ -1848,16 +1848,21 @@
 %22score%22%3E
+%0A    
 $%7Bresult
@@ -1866,16 +1866,21 @@
 ult%7D%3Cbr%3E
+%0A    
 Score: X
@@ -1885,16 +1885,21 @@
  X/Y%3Cbr%3E
+%0A    
 On $%7Btot
@@ -1918,16 +1918,21 @@
 yers%3Cbr%3E
+%0A    
 $%7Bpercen
@@ -1957,13 +1957,59 @@
 %3Cbr%3E
-&gt; 
+%0A    &gt; %3Ca href=%22$%7BgoogleTruth%7D%22 target=%22_blank%22%3E
 The 
@@ -2020,16 +2020,23 @@
 le Truth
+%3C/a%3E%0A  
 %3C/div%3E%60;

Add Google Truth link