how can i include javascript in appian with html

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
</head>
<body>
<pre></pre>
<script>
document.body.insertAdjacentHTML('afterbegin', "Dinesh");
</script>
</body>
</html>

if i use the script  inside double quotes the script not working

  Discussion posts and replies are publicly visible