Ad
let stringToHTML = (el = 'div', attr = [], template = '') => 
  `<${el} ${attr.join(' ')}>${template}</${el}>`,
  
  element = 'a',
  content = "https://www.codewars.com"
  attributes = [`href='${content}'`, "class='link'"];
  
stringToHTML(element, attributes, content);

// => "<a href='https://www.codewars.com' class='link'>https://www.codewars.com</a>"