console
var SVG_NS = "http://www.w3.org/2000/svg"
var svgArea = document.getElementById('svgArea')
var svg = document.createElementNS(SVG_NS, 'svg')
var g = document.createElementNS(SVG_NS, 'g')
var path = document.createElementNS(SVG_NS, 'path')
svg.setAttribute('width','16')
svg.setAttribute('height','8')
svg.setAttribute('viewBox','0 0 16 8')
svg.setAttribute('fill','none')
svg.setAttribute('xmlns','http://www.w3.org/2000/svg')
g.setAttribute('id','chevron-up-active')
path.setAttribute('id','Union')
path.setAttribute('d','M12.4583 5.53774L11.5391 6.45698L7.99868 2.9166L4.4583 6.45698L3.53906 5.53774L7.99868 1.07812L12.4583 5.53774Z')
path.setAttribute('fill','#864BFF')
svg.appendChild(g)
g.appendChild(path)
svgArea.appendChild(svg)
<div id="svgArea"></div>