#3 JavaScript Tutorial | First Hello World Program
In this tutorial post we will be running our first JavaScript program which is a basic Hello World program where we ill simple print Hello World(or any other text) on the browser.
The 2 softwares needed to start of with JavaScript are –
Text Editor : I will be using Visual Studio Code Text Editor which is highly recommended by many specially for Javascript, however you can use any other text editor like Notepad++ or Sublime text etc.
Browser : Of course a browser is needed to load the HTML document and run the JavaScript so I will be using Google Chrome browser. You can use any browser of your choice as most modern browsers have JavaScript enabled by default.
There are 2 ways to include JavaScript in your HTML Document –
Embedding JavaScript in the same HTML document
Using External JavaScript file and linking it in your HTML document.
1. Embedding JS in HTML document –
As you can see in the code below, we are embedding JS code using the script tag of HTML. Usually when the JavaScript code is small it is directly embedded in the HTML document, however, it is not recommended to embed large sized JS code directly in the HTML document as the code becomes un-organized.
2. External JavaScript File –
As you can see below there are 2 file – one the actual HTML document and other a separate external javascript file (demo.js). This demo.js file is linked in the HTML document using the script tag with the use of the attribute src as shown in the code below. When the javascript code is large, it is highly recommended to use a separate external file to keep the HTML doc and the JS code organized.
For Program code and more resources checkout this article – https://simplesnippets.tech/first-hello-world-program-in-javascript/
Video by – Tanmay Sakpal
Simple Snippets Channel link – https://www.youtube.com/simplesnippets
Teluskunna enka teluskunta…thanks
hi i failed to understand how to install and use visualstudio code editor,please explain step by step about vsce
good Job.
hello, sir, the way you explain is very osm. that's what I was looking for a long time today thank you, sir.
good job👍🏻
you can type ! and press tab in a default emoty html file and it will write basic html script
You voice has some majic
plz make editer bg color to white
Thx🌸🥰
bro mere me to document.write lihtehi error aagya
awesomeee explaination…
Voice is superb thank you bro
basics of js is very muvh needed in web hacking
very helpful video…
Android main hoga??
i just subscribe great teacher
Plzz help me my js programs are not working
Thanks bro 🙏🙏
Use live server extension of vs code ,,so don't have to refresh crime again and again
nice one
Can u just tell me how to open ur saved files like u did u said "I just saved in default then chrome opens" how it happens I don't know
Nice
I have no idea wtf I'm doing but this is fun 🙂
Thank you for the video
Everything is working but External file
May be there's a problem coz I use my Mac?
awesome
Hey what's up aliens???!!!!
Hey can you help me with the following topics?
filter, map and reduce
arrow functions,
template literals
default parameters
object literals
rest and spread operators
destructuring assignment
Did he said "Hey what's up aliens!" at the intro?
The way he says Peace is FUNNY but sounds cute though🤣🤣🤣🤣.Hit Like Whoever agrees!
Sir
With which extension we have to save it???
Please tell me
Just subscribed
How to set up vs code . This is the first time i am using this
can we use subline
Love the way you taught
Thank u so much 🇳🇵🇳🇵