JavaScript used to make HTML pages more dynamic and interactive.In HTML used javascript with <script> tag is used to define a client side script.the following simple example using javascript.
<script>
document.getElementById("test").innerHTML = "Hello";
</script>