JSFiddle - React, Tailwind, and code Playground
HTML
<svg width="100" height="100">
<script>
function test() {
var l= [0,1,2,3];
console.log(l.length);
<!--for (var i=0; i<l.length; i++) {
console.log(i);
}-->
}
</script>
<text x="20" y="20" onclick="test()">CLICK ME</text>
</svg>