JSFiddle - React, Tailwind, and code Playground

by Nishit Maheta

HTML

<a href="javascript:void(0)">CLICK</a>

JavaScript

$(document).ready(function () {
    $('a').on('click', function () {
        $('<script>').text('console.log("running")').appendTo('head');
     });
});