2 What is JavaScript

So let’s get started with this course and with everything you need to know about JavaScript by diving into this important question what is javascript. Let’s have a look at a couple of definitions. JavaScript is a dynamic weakly typed programming language which is compiled at runtime. It can be executed as part of a web page in a browser or directly on any machine in a so-called host environment. Not entirely clear yet. Let’s have a look at an additional definition. Javascript was created to make Web pages more dynamic. That’s kind of the idea why javascript was invented in the past you could say more about the history of JavaScript in a second by the way. So it was invented to change the content on a page directly from inside the browser. And originally it was called life script but due to the popularity of Java back at the time it was renamed to javascript to resemble Java by its name. Javascript however is totally independent from Java. That’s important to understand and has nothing in common. It really was just named javascript because while Java was popular and well people who invented javascript want the javascript to be a thing I guess but I’m not sure are these definitions really clear. Do you now know what javascript is. Does dynamic weakly typed compiled at runtime make web pages more dynamic. Does this tell you something. Well let’s take a step back maybe. How do web pages work you are the user visiting a Web page and when you do visit a web page you use browser for that you use your client your machine your laptop your computer where you have a browser installed on it. You enter a you are L or click on a search result on Google and the web page gets loaded. To be precise when you initially visit a Web page a request is sent to the server. So to a computer in the Internet where dad web page where the H him l file is hosted and that server then loads that web page and sends it back to your browser in a so-called response at the most basic form of response we know or we typically see and use when we work with the Internet. When we visit a page is simply an H to mail page which is sent back by the server to the client. Now let’s say on that loaded web page let’s say it’s an online shop. Doesn’t really matter. The user clicks a button to submit a form for example to order some products. Now this will then trigger a new request which is sent by the browser to the server to send this form submission to the server and the server will handle that incoming request. Maybe storing some order data in a database and once it’s done it will reply back with a new response with a new Web page a new age HTML document which is sent back to the client maybe d Order a confirmation page so this is how we interact with the web. This is how web pages traditionally work. Now javascript helps us make this more reactive. It helps us make a web page more reactive and skip that second request response flow in some circumstances to instead change the already loaded page and do something there.

Add a Comment

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