Javascript–first program

Okay, let’s start writing Javascript!!



There are two code snippets here, first one is JavaScript and second one is HTML. Write both these in a Notepad and save as index.html and simplejs.js. Keep both in the same folder and open the html file in a browser.

When the file opens, it will be blank. Right click on it and select inspect and then click console.

You can see the output as below:


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.