In this article, we will be discussing What is JavaScript? and What it does? with the help of some examples. So let's first try to answer one question i.e. What is JavaScript?
So, first let's get one thing away that JavaScript has nothing to do with Java. JavaScript is not Java. In fact, these are the most popular languages, with similar names is unfortunate, because they really have nothing to do with each other.
But like Java, JavaScript is also a programming language and probably the most popular and widely used in the world now. So What does JavaScript do? Well ! as said earlier JavaScript is a programming language and what that effectively means is that it allows you to program or you can think of it is possible bossing around the web.
You can use it either to program web browsers, you can also use it to program servers, in this article we will be looking at examples and mostly talking about things that are client side only but as far as the language itself everything you learn about JavaScript will be applicable to programming a web browser or working with technology is like a node or the server-side JavaScript environments.
JavaScript creates interactivity. So that means it allows things in the browser which would previously in the early days of the web generally static that is your page would download, it would load some images and really the only moment or the changes you might see would be in the form of animation or something on those lines.
JavaScript lets you create very rich interactivity. These days JavaScript is taking over for areas of interactivity that maybe 5 or 6 years ago were entirely done with flash.
But JavaScript has the advantage of working on many modern mobile devices, so if you are looking at a website on phone or other forms of mobile computing platforms and you would see interactivity where things are moving around or there are visual effects things like that and if it is working on those devices then they have been created using JavaScript.
If you really want to see some of the things that JavaScript does then try disabling JavaScript in your browser at some point and observe browsing a web and watch what happens. A lot of things kind of disappear or kind of break or if they work, they work in different ways.
Ideally, websites would be built so that JavaScript is not required because there are a lot of environments where it does not work. That's a technique which we call progressive enhancement. But you would certainly see a lot of modern websites the things that just absolutely do not work or do not completely inaccessible when a JavaScript is turned off.
So let us take a look at some of the examples:
For Example, JavaScript is all over the place on Twitter. We have simple things like being able to expand the tweets to see the retweets that are in JavaScript. A sign-in box is in JavaScript. Scroll down the page at a certain point more tweets load automatically it is also done using JavaScript, even we can pull in a photo so already everywhere JavaScript is used. The slideshow on the home page, little visual sliding effects this also done using JavaScript.
Let us try to watch this website by disabling JavaScript again and when it reloads the website will also show a message that the JavaScript is not active in your browser. You will find out that the slideshows are not working. If you reload twitter, you cannot get to sign in a box, you can see tweets but at a certain point at the bottom it starts spinning continuously, scrolled will spin forever.
There are other examples of JavaScript all over the web. Like web game = cut the rope, Google maps are also built using JavaScript and other technologies but no flash.
it has been used extensively all over the web.
I hope you I helped you!!!
Visit- HostMyWeb
No comments:
Post a Comment