import React from 'react';

export default function joinValues(values) {
  if (values.length < 2) {
    return values[0] || '';
  }

  return (
    <div>
      {values.map((el, i) => (
        <span key={i}>
          {i > 0 && i !== values.length - 1 && ', '}
          {i === values.length - 1 && ' og '}
          {el}
        </span>
      ))}
    </div>
  );
}

@@ -142,19 +142,20 @@
  (%0A    %3C
-div
+span
 %3E%0A      
@@ -352,11 +352,12 @@
   %3C/
-div
+span
 %3E%0A  

Output a span from joinValues