Where can I write javascript code? You can write javascript code in a text editor such as notepad. So, Let's we to try write javascriptcode using notepad.
Written javascript code between the tags <script> and </ script>, can we paste on our HTML code. Now let's save the code with File Name: test.html, do not forget to Save as type: All Files, as shown below.
Javascript can also be written separately, given the file extension js. Example: namafile.js, how to insert it in the html file is as follows:
<script type="text/javascript" src="filename.js"></script>
Sign up here with your email