WEBVTT

00:00.000 --> 00:12.960
Welcome to the JavaScript course. Let's have a short intro and discuss the need for

00:12.960 --> 00:18.520
JavaScript. If you ever wondered how websites come to life, responding to your every click

00:18.520 --> 00:24.120
and key stroke, it's all thanks to one language JavaScript. JavaScript is a programming

00:24.120 --> 00:28.960
language that allows web developers to add interactivity to their website, such as

00:28.960 --> 00:33.400
buttons that change color when you have over them, menace that drop down when you click

00:33.400 --> 00:39.560
on them and even games and animations. For instance, the user enters some text into

00:39.560 --> 00:45.400
a form on the web page and clicks on the Submit button. The text is sent to a server and

00:45.400 --> 00:50.600
the user receives a response. JavaScript can also be used to send and receive data from

00:50.600 --> 00:56.000
servers. This allows you to create dynamic web pages that can update themselves without

00:56.000 --> 01:01.640
the user having to reload them. Let's take this sample HTML code. This only creates

01:01.640 --> 01:06.360
the structure and contents that are static, like a heading in a button. Now we can add

01:06.360 --> 01:11.880
the styling properties using CSS. So now it looks more attractive, but the button is not

01:11.880 --> 01:17.560
functioning for that. We need JavaScript. We can use even listeners to make this things

01:17.560 --> 01:22.960
happen when users interact with our page. Don't get serious. We will explain this later

01:22.960 --> 01:30.360
in our videos. So we write the JS code inside Script tab. Place it in the HTML. Every browser

01:30.360 --> 01:36.280
has a JavaScript engine in it. So we can easily execute the code in any browser. Now on

01:36.280 --> 01:41.640
the web page, when the button is clicked, the alert says Hello World. So this is how we

01:41.640 --> 01:48.160
use JavaScript in our HTML. Let's see a real-life model to demonstrate this. Let's say you're

01:48.160 --> 01:54.080
building a house. HTML is like the blueprint defining the structure of your house. CSS

01:54.080 --> 01:59.480
is like the paint and decorations making the house beautiful. And now JavaScript is like

01:59.480 --> 02:06.360
electricity. Bring the house to life. JavaScript makes the events happen based on your actions.

02:06.360 --> 02:12.040
JavaScript is your switch and you are the one in control, just like when you flip a switch

02:12.040 --> 02:17.840
to light of a room. JavaScript makes web elements come alive at your command. Let's say

02:17.840 --> 02:22.800
the real-time use cases of JavaScript on the websites. If a website does more than

02:22.800 --> 02:29.000
just sit there and stare at you, then it's using JavaScript. Image sliders. When you

02:29.000 --> 02:34.080
use an image slider on a website to view different product images, JavaScript is used

02:34.080 --> 02:39.760
to load the images and animate it the slider. Search bars. When you type into the search

02:39.760 --> 02:44.840
bar on a website, JavaScript is used to filter the results and display the most relevant

02:44.840 --> 02:50.480
ones. Social media. When you click the like button on a social media post, JavaScript

02:50.480 --> 02:56.080
is used to update the number of likes the post has. Online games. JavaScript is used to

02:56.080 --> 03:00.920
create all sorts of online games from simple ones like Tic Tac Toe to complex ones like

03:00.920 --> 03:07.080
first-person shooters. Understanding JavaScript is essential for any web developer. It's

03:07.080 --> 03:13.180
the key to creating dynamic, engaging, and interactive websites. Throughout this course,

03:13.180 --> 03:18.980
try writing code alongside our lessons to see JavaScript in action. We will simplify complex

03:18.980 --> 03:24.500
concepts with visuals, diagrams, and code snippets to ensure your grasp JavaScript easily.

