The type attribute in JavaScript is optional since the introduction of HTML5 brought some new improvements. JavaScript became the default language for HTML5 and modern browsers. So, now adding text/javascript isn’t required in <script> tag.
This attribute is what is now recommended to indicate the scripting language in use and its value should be set to "text/javascript".
Here you can see how it is used:
<html>
<body>
<script language="javascript" type="text/javascript">
<!--
document.write("Hello World!")
//-->
</script>
</body>
</html>