Java script is lightweight, interpreted, web scripting programming language.
There are two way to write js code and run code
Using <script> tag:
<title>Js code using script tag</title>
Using file with .js extension
save this file as first.js
create new html file with extension .html as first.html