fungsi html js

<a id="myElem" href="javascript:myFunction()">Button Text</a>

<script type="text/javascript">
 function myFunction()
 {
     console.log('myFunction triggered!')
     secondFunction()
 }

 function secondFunction()
 {
     console.log('second function triggered!')
 }
</script>
CoderHomie