call javascript function from html

JavaScript
<!-- Answer to: "call javascript function from html" -->

<!-- Just call it from a <script> tag: -->

<!--
JavaScript:
  function heyFunc(a) {
	console.log(`Hello ${a}!`);
  };
-->


<marquee>
  Hello!
  <script>heyFunc(World);</script> <!-- Returns: "Hello World!" -->
</marquee>
Source

Also in JavaScript: