CHAPTER - 3

Which Editor to use for Javascript?

Javascript is very simple and it can be written in as simple an editor as Notepad. But you should use the text editor which helps in debugging the code. My favourite editors are SublimeText and Visual Code Editor.

You can download it from here

https://www.sublimetext.com/

https://code.visualstudio.com/download

Javascript First Program

Let's start a javascript program with as simple as alert()

<script>

alert('Hello World');

</script>



Output:


Output Options :

You can see the output either through document.write() or console.log()




If you use the document.write() method in javascript, the output will show in the browser window. 
Generally, if you are working with HTML and JavaScript, document. write() is ideal for user output. But for testing purposes, you can use console.log() to see the output.

Let's change the code and see the output


Output:

Comments

Popular posts from this blog

CHAPTER - 14

CHAPTER - 18