'use strict';

const productFromCSV = (productString) => {
  const [name, category, price] = productString.split(', ');
  return {
    name: name,
    category: category,
    price: price,
  };
};

const product = productFromCSV('Backpack of Holding, Travel, 29.99');
console.dir(product);
