I need to learn how to create a SVG element with a javascript function
The style of my html file essentially:
<body>
<svg></svg>
<script></script>
</body>
My script contains a function that creates a chart, if the function was hypothetically called create(chartName, chartAxises) how would I create a chart inside my svg element?
Thank you in advance, and I apologize for my unorganized thoughts. I just need to know the syntax, I have tried multiple things for hours so now I'm hoping for a different perspective